Example usage for org.apache.hadoop.mapreduce.protocol ClientProtocol getNewJobID

List of usage examples for org.apache.hadoop.mapreduce.protocol ClientProtocol getNewJobID

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce.protocol ClientProtocol getNewJobID.

Prototype

public JobID getNewJobID() throws IOException, InterruptedException;

Source Link

Document

Allocate a name for the job.

Usage

From source file:org.apache.ignite.client.hadoop.GridHadoopClientProtocolSelfTest.java

License:Apache License

/**
 * Test next job ID generation.//  w  w  w. j av a  2  s  .  c o  m
 *
 * @throws Exception If failed.
 */
@SuppressWarnings("ConstantConditions")
private void tstNextJobId() throws Exception {
    GridHadoopClientProtocolProvider provider = provider();

    ClientProtocol proto = provider.create(config(GridHadoopAbstractSelfTest.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);
}

From source file:org.apache.ignite.client.hadoop.HadoopClientProtocolSelfTest.java

License:Apache License

/**
 * Test next job ID generation.//  w  w w  .j a  v  a  2s  .  c  om
 *
 * @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);
}