use of com.emc.storageos.management.backup.exceptions.RetryableBackupException in project coprhd-controller by CoprHD.
the class BackupOps method queryLocalBackupInfo.
public BackupInfo queryLocalBackupInfo(String backupTag) {
BackupInfo backupInfo = new BackupInfo();
backupInfo.setBackupName(backupTag);
for (int retryCnt = 0; retryCnt < BackupConstants.RETRY_MAX_CNT; retryCnt++) {
try {
BackupRestoreStatus s = queryBackupRestoreStatus(backupTag, true);
backupInfo.setRestoreStatus(s);
List<BackupProcessor.BackupTask<BackupInfo>> backupTasks = new BackupProcessor(getHosts(), Arrays.asList(ports.get(2)), backupTag).process(new QueryBackupCallable(), true);
for (BackupProcessor.BackupTask task : backupTasks) {
BackupInfo backupInfoFromNode = (BackupInfo) task.getResponse().getFuture().get();
log.info("Query backup({}) success", backupTag);
mergeBackupInfo(backupInfo, backupInfoFromNode);
}
} catch (RetryableBackupException e) {
log.info("Retry to query backup {}", backupTag);
continue;
} catch (Exception e) {
log.warn("Query local backup({}) info got an error", backupTag, e);
}
break;
}
return backupInfo;
}
Aggregations