use of org.apache.ignite.hadoop.mapreduce.IgniteHadoopClientProtocolProvider in project ignite by apache.
the class HadoopClientProtocolSelfTest method tstUnknownJobCounters.
/**
* 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";
}
}
use of org.apache.ignite.hadoop.mapreduce.IgniteHadoopClientProtocolProvider in project ignite by apache.
the class HadoopClientProtocolSelfTest method tstNextJobId.
/**
* Test next job ID generation.
*
* @throws Exception If failed.
*/
@SuppressWarnings("ConstantConditions")
private void tstNextJobId() throws Exception {
IgniteHadoopClientProtocolProvider provider = provider();
ClientProtocol proto = provider.create(config(HadoopAbstractSelfTest.REST_PORT));
JobID jobId = proto.getNewJobID();
assert jobId != null;
assert jobId.getJtIdentifier() != null;
JobID nextJobId = proto.getNewJobID();
assert nextJobId != null;
assert nextJobId.getJtIdentifier() != null;
assert !F.eq(jobId, nextJobId);
}
Aggregations