@Override protected int runWithJob(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final Job job, final BufferedReader stdin) throws ExecutionException, InterruptedException, IOException { final JobId jobId = job.getId(); final List<String> hosts = options.getList(hostsArg.getDest()); final Deployment deployment = new Deployment.Builder() .setGoal(Goal.STOP) .setJobId(jobId) .build(); if (!json) { out.printf("Stopping %s on %s%n", jobId, hosts); } return Utils.setGoalOnHosts(client, out, json, hosts, deployment, options.getString(tokenArg.getDest())); } }
@Override protected int runWithJob(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final Job job, final BufferedReader stdin) throws ExecutionException, InterruptedException, IOException { final JobId jobId = job.getId(); final List<String> hosts = options.getList(hostsArg.getDest()); final Deployment deployment = new Deployment.Builder() .setGoal(Goal.START) .setJobId(jobId) .build(); if (!json) { out.printf("Starting %s on %s%n", jobId, hosts); } return Utils.setGoalOnHosts(client, out, json, hosts, deployment, options.getString(tokenArg.getDest())); } }
final List<String> hosts = options.getList(hostsArg.getDest()); final Deployment deployment = new Deployment.Builder() .setGoal(Goal.STOP) .setJobId(jobId)
final Deployment deployment = new Deployment.Builder() .setGoal(Goal.START) .setJobId(jobId)
public static Builder newBuilder() { return new Builder(); }