/** * Tests job counters retrieval for unknown job id. * * @throws Exception If failed. */ private void tstUnknownJobCounters() throws Exception { IgniteHadoopClientProtocolProvider provider = provider(); ClientProtocol proto = provider.create(config(HadoopAbstractSelfTest.REST_PORT)); try { proto.getJobCounters(new JobID(UUID.randomUUID().toString(), -1)); fail("exception must be thrown"); } catch (Exception e) { assert e instanceof IOException : "wrong error has been thrown"; } }
@Override public Counters run() throws IOException, InterruptedException { return cluster.getClient().getJobCounters(getJobID()); } });
@Override public Counters run() throws IOException, InterruptedException { return cluster.getClient().getJobCounters(getJobID()); } });
@Override public Counters run() throws IOException, InterruptedException { return cluster.getClient().getJobCounters(getJobID()); } });
@Override public Counters run() throws IOException, InterruptedException { return cluster.getClient().getJobCounters(getJobID()); } });
/** * Gets the counters for this job. May return null if the job has been * retired and the job is no longer in the completed job store. * * @return the counters for this job. * @throws IOException */ public Counters getCounters() throws IOException, InterruptedException { ensureState(JobState.RUNNING); return cluster.getClient().getJobCounters(getJobID()); }