if (jsonParameters.getParameter(JsonParameters.NEW_INSTANCE) == null
|| jsonParameters.getParameter(JsonParameters.OLD_INSTANCE) == null) {
throw new HelixException("Missing Json paramaters: '" + JsonParameters.NEW_INSTANCE
+ "' or '" + JsonParameters.OLD_INSTANCE + "' ");
}
setupTool.swapInstance(clusterName,
jsonParameters.getParameter(JsonParameters.OLD_INSTANCE),
jsonParameters.getParameter(JsonParameters.NEW_INSTANCE));
} else {
throw new HelixException("Unsupported command: " + command + ". Should be one of ["
+ ClusterSetup.addInstance + ", " + ClusterSetup.swapInstance + "]");