@Override public void perform(Arguments arguments, PrintStream output) throws Exception { Args<T> args = readArgs(arguments); if (args.programs.isEmpty()) { output.printf(String.format("application '%s' contains no programs of type '%s'", args.appId.getEntityName(), Joiner.on(',').join(args.programTypes))); return; } runBatchCommand(output, args); }
@Override public void perform(Arguments arguments, PrintStream output) throws Exception { Args<T> args = readArgs(arguments); if (args.programs.isEmpty()) { output.printf(String.format("application '%s' contains no programs of type '%s'", args.appId.getEntityName(), Joiner.on(',').join(args.programTypes))); return; } runBatchCommand(output, args); }
@Override public void perform(Arguments arguments, PrintStream output) throws Exception { ApplicationId appId = parseApplicationId(arguments); appClient.delete(appId); output.printf("Successfully deleted application '%s.%s'\n", appId.getEntityName(), appId.getVersion()); }
@Override public void perform(Arguments arguments, PrintStream output) throws Exception { ApplicationId appId = parseApplicationId(arguments); appClient.delete(appId); output.printf("Successfully deleted application '%s.%s'\n", appId.getEntityName(), appId.getVersion()); }
programClient.setWorkerInstances(workerId, numInstances); output.printf("Successfully set worker '%s' of app '%s' to %d instances\n", workerName, appId.getEntityName(), numInstances); break; case SERVICE: programClient.setServiceInstances(service, numInstances); output.printf("Successfully set service '%s' of app '%s' to %d instances\n", serviceName, appId.getEntityName(), numInstances); break; default:
programClient.setFlowletInstances(flowletId, numInstances); output.printf("Successfully set flowlet '%s' of flow '%s' of app '%s' to %d instances\n", flowId, flowletId, appId.getEntityName(), numInstances); break; case WORKER: programClient.setWorkerInstances(workerId, numInstances); output.printf("Successfully set worker '%s' of app '%s' to %d instances\n", workerName, appId.getEntityName(), numInstances); break; case SERVICE: programClient.setServiceInstances(service, numInstances); output.printf("Successfully set service '%s' of app '%s' to %d instances\n", serviceName, appId.getEntityName(), numInstances); break; default:
private void addProgram(MDSKey.Builder keyBuilder, ProgramId program) { keyBuilder.add(PROGRAM_MARKER) .add(program.getNamespace()) .add(program.getParent().getEntityName()) .add(program.getType().getCategoryName()) .add(program.getEntityName()); }
private void addProgram(MDSKey.Builder keyBuilder, ProgramId program) { keyBuilder.add(PROGRAM_MARKER) .add(program.getNamespace()) .add(program.getParent().getEntityName()) .add(program.getType().getCategoryName()) .add(program.getEntityName()); }