use of com.emc.storageos.management.jmx.recovery.DbManagerOps in project coprhd-controller by CoprHD.
the class CommandHandler method repairDb.
public static int repairDb(String[] args) throws Exception {
boolean isGeodb = false;
boolean canResume = true;
boolean crossVdc = false;
for (int i = 1; i < args.length; i++) {
if (args[1].compareToIgnoreCase("-db") == 0) {
isGeodb = false;
} else if (args[1].compareToIgnoreCase("-geodb") == 0) {
isGeodb = true;
} else if (args[1].compareToIgnoreCase("-new") == 0) {
canResume = false;
} else if (args[1].compareToIgnoreCase("-crossVdc") == 0) {
crossVdc = true;
} else {
throw new IllegalArgumentException(String.format("Invalid argument at #%d: %s", i, args[i]));
}
}
try (DbManagerOps dbManagerOps = new DbManagerOps(isGeodb ? Constants.GEODBSVC_NAME : Constants.DBSVC_NAME)) {
dbManagerOps.startNodeRepair(canResume, crossVdc);
}
return 0;
}
Aggregations