public static void watchJobsOnHosts(final PrintStream out, final boolean exact, final List<String> resolvedHosts, final List<JobId> jobIds, final Integer interval, final HeliosClient client) throws InterruptedException, ExecutionException { watchJobsOnHosts(out, exact, resolvedHosts, Sets.newHashSet(jobIds), interval, ImmutableList.of(new TargetAndClient(client))); }
@Override int run(final Namespace options, final List<TargetAndClient> clients, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException, IOException { final boolean exact = options.getBoolean(exactArg.getDest()); final List<String> prefixes = options.getList(prefixesArg.getDest()); final String jobIdString = options.getString(jobsArg.getDest()); final List<ListenableFuture<Map<JobId, Job>>> jobIdFutures = Lists.newArrayList(); for (final TargetAndClient cc : clients) { jobIdFutures.add(cc.getClient().jobs(jobIdString)); } final Set<JobId> jobIds = Sets.newHashSet(); for (final ListenableFuture<Map<JobId, Job>> future : jobIdFutures) { jobIds.addAll(future.get().keySet()); } watchJobsOnHosts(out, exact, prefixes, jobIds, options.getInt(intervalArg.getDest()), clients); return 0; }
JobWatchCommand.watchJobsOnHosts(out, true, resolvedHosts, ImmutableList.of(jobId), options.getInt(intervalArg.getDest()), client);
public static void watchJobsOnHosts(final PrintStream out, final boolean exact, final List<String> resolvedHosts, final List<JobId> jobIds, final Integer interval, final HeliosClient client) throws InterruptedException, ExecutionException { watchJobsOnHosts(out, exact, resolvedHosts, Sets.newHashSet(jobIds), interval, ImmutableList.of(new TargetAndClient(client))); }
@Override int run(final Namespace options, final List<TargetAndClient> clients, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException, IOException { final boolean exact = options.getBoolean(exactArg.getDest()); final List<String> prefixes = options.getList(prefixesArg.getDest()); final String jobIdString = options.getString(jobsArg.getDest()); final List<ListenableFuture<Map<JobId, Job>>> jobIdFutures = Lists.newArrayList(); for (final TargetAndClient cc : clients) { jobIdFutures.add(cc.getClient().jobs(jobIdString)); } final Set<JobId> jobIds = Sets.newHashSet(); for (final ListenableFuture<Map<JobId, Job>> future : jobIdFutures) { jobIds.addAll(future.get().keySet()); } watchJobsOnHosts(out, exact, prefixes, jobIds, options.getInt(intervalArg.getDest()), clients); return 0; }
JobWatchCommand.watchJobsOnHosts(out, true, resolvedHosts, ImmutableList.of(jobId), options.getInt(intervalArg.getDest()), client);