Java Code Examples for org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest#setJobId()

The following examples show how to use org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest#setJobId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientServiceDelegate.java    From hadoop with Apache License 2.0 5 votes vote down vote up
public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException,
InterruptedException {
  org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0);
    GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class);
    request.setJobId(jobID);
    Counters cnt = ((GetCountersResponse)
        invoke("getCounters", GetCountersRequest.class, request)).getCounters();
    return TypeConverter.fromYarn(cnt);

}
 
Example 2
Source File: ClientServiceDelegate.java    From big-c with Apache License 2.0 5 votes vote down vote up
public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException,
InterruptedException {
  org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0);
    GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class);
    request.setJobId(jobID);
    Counters cnt = ((GetCountersResponse)
        invoke("getCounters", GetCountersRequest.class, request)).getCounters();
    return TypeConverter.fromYarn(cnt);

}
 
Example 3
Source File: TestClientServiceDelegate.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private GetCountersRequest getCountersRequest() {
  GetCountersRequest request = Records.newRecord(GetCountersRequest.class);
  request.setJobId(jobId);
  return request;
}
 
Example 4
Source File: TestClientServiceDelegate.java    From big-c with Apache License 2.0 4 votes vote down vote up
private GetCountersRequest getCountersRequest() {
  GetCountersRequest request = Records.newRecord(GetCountersRequest.class);
  request.setJobId(jobId);
  return request;
}