类org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersResponse源码实例Demo

下面列出了怎么用org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersResponse的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: hadoop   文件: TestClientServiceDelegate.java
private GetCountersResponse getCountersResponseFromHistoryServer() {
  GetCountersResponse countersResponse = Records
      .newRecord(GetCountersResponse.class);
  Counter counter = Records.newRecord(Counter.class);
  CounterGroup counterGroup = Records.newRecord(CounterGroup.class);
  Counters counters = Records.newRecord(Counters.class);
  counter.setDisplayName("dummyCounter");
  counter.setName("dummyCounter");
  counter.setValue(1001);
  counterGroup.setName("dummyCounters");
  counterGroup.setDisplayName("dummyCounters");
  counterGroup.setCounter("dummyCounter", counter);
  counters.setCounterGroup("dummyCounters", counterGroup);
  countersResponse.setCounters(counters);
  return countersResponse;
}
 
源代码2 项目: big-c   文件: TestClientServiceDelegate.java
private GetCountersResponse getCountersResponseFromHistoryServer() {
  GetCountersResponse countersResponse = Records
      .newRecord(GetCountersResponse.class);
  Counter counter = Records.newRecord(Counter.class);
  CounterGroup counterGroup = Records.newRecord(CounterGroup.class);
  Counters counters = Records.newRecord(Counters.class);
  counter.setDisplayName("dummyCounter");
  counter.setName("dummyCounter");
  counter.setValue(1001);
  counterGroup.setName("dummyCounters");
  counterGroup.setDisplayName("dummyCounters");
  counterGroup.setCounter("dummyCounter", counter);
  counters.setCounterGroup("dummyCounters", counterGroup);
  countersResponse.setCounters(counters);
  return countersResponse;
}
 
源代码3 项目: hadoop   文件: MRClientService.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request) 
  throws IOException {
  JobId jobId = request.getJobId();
  Job job = verifyAndGetJob(jobId, JobACL.VIEW_JOB, true);
  GetCountersResponse response =
    recordFactory.newRecordInstance(GetCountersResponse.class);
  response.setCounters(TypeConverter.toYarn(job.getAllCounters()));
  return response;
}
 
源代码4 项目: hadoop   文件: NotRunningJob.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  GetCountersResponse resp =
    recordFactory.newRecordInstance(GetCountersResponse.class);
  Counters counters = recordFactory.newRecordInstance(Counters.class);
  counters.addAllCounterGroups(new HashMap<String, CounterGroup>());
  resp.setCounters(counters);
  return resp;
}
 
源代码5 项目: hadoop   文件: ClientServiceDelegate.java
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);

}
 
源代码6 项目: hadoop   文件: TestClientRedirect.java
@Override
 public GetCountersResponse getCounters(GetCountersRequest request)
     throws IOException {
   hsContact = true;
   Counters counters = getMyCounters();
   GetCountersResponse response = recordFactory.newRecordInstance(GetCountersResponse.class);
   response.setCounters(counters);
   return response;
}
 
源代码7 项目: hadoop   文件: TestClientRedirect.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  JobId jobID = request.getJobId();

  amContact = true;

  Counters counters = getMyCounters();
  GetCountersResponse response = recordFactory
      .newRecordInstance(GetCountersResponse.class);
  response.setCounters(counters);
  return response;
}
 
源代码8 项目: hadoop   文件: MRClientProtocolPBServiceImpl.java
@Override
public GetCountersResponseProto getCounters(RpcController controller,
    GetCountersRequestProto proto) throws ServiceException {
  GetCountersRequest request = new GetCountersRequestPBImpl(proto);
  try {
    GetCountersResponse response = real.getCounters(request);
    return ((GetCountersResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
源代码9 项目: hadoop   文件: MRClientProtocolPBClientImpl.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  GetCountersRequestProto requestProto = ((GetCountersRequestPBImpl)request).getProto();
  try {
    return new GetCountersResponsePBImpl(proxy.getCounters(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
源代码10 项目: hadoop   文件: HistoryClientService.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  JobId jobId = request.getJobId();
  Job job = verifyAndGetJob(jobId, true);
  GetCountersResponse response = recordFactory.newRecordInstance(GetCountersResponse.class);
  response.setCounters(TypeConverter.toYarn(job.getAllCounters()));
  return response;
}
 
源代码11 项目: big-c   文件: MRClientService.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request) 
  throws IOException {
  JobId jobId = request.getJobId();
  Job job = verifyAndGetJob(jobId, JobACL.VIEW_JOB, true);
  GetCountersResponse response =
    recordFactory.newRecordInstance(GetCountersResponse.class);
  response.setCounters(TypeConverter.toYarn(job.getAllCounters()));
  return response;
}
 
源代码12 项目: big-c   文件: NotRunningJob.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  GetCountersResponse resp =
    recordFactory.newRecordInstance(GetCountersResponse.class);
  Counters counters = recordFactory.newRecordInstance(Counters.class);
  counters.addAllCounterGroups(new HashMap<String, CounterGroup>());
  resp.setCounters(counters);
  return resp;
}
 
源代码13 项目: big-c   文件: ClientServiceDelegate.java
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);

}
 
源代码14 项目: big-c   文件: TestClientRedirect.java
@Override
 public GetCountersResponse getCounters(GetCountersRequest request)
     throws IOException {
   hsContact = true;
   Counters counters = getMyCounters();
   GetCountersResponse response = recordFactory.newRecordInstance(GetCountersResponse.class);
   response.setCounters(counters);
   return response;
}
 
源代码15 项目: big-c   文件: TestClientRedirect.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  JobId jobID = request.getJobId();

  amContact = true;

  Counters counters = getMyCounters();
  GetCountersResponse response = recordFactory
      .newRecordInstance(GetCountersResponse.class);
  response.setCounters(counters);
  return response;
}
 
源代码16 项目: big-c   文件: MRClientProtocolPBServiceImpl.java
@Override
public GetCountersResponseProto getCounters(RpcController controller,
    GetCountersRequestProto proto) throws ServiceException {
  GetCountersRequest request = new GetCountersRequestPBImpl(proto);
  try {
    GetCountersResponse response = real.getCounters(request);
    return ((GetCountersResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
源代码17 项目: big-c   文件: MRClientProtocolPBClientImpl.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  GetCountersRequestProto requestProto = ((GetCountersRequestPBImpl)request).getProto();
  try {
    return new GetCountersResponsePBImpl(proxy.getCounters(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
源代码18 项目: big-c   文件: HistoryClientService.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  JobId jobId = request.getJobId();
  Job job = verifyAndGetJob(jobId, true);
  GetCountersResponse response = recordFactory.newRecordInstance(GetCountersResponse.class);
  response.setCounters(TypeConverter.toYarn(job.getAllCounters()));
  return response;
}
 
源代码19 项目: incubator-tez   文件: NotRunningJob.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  GetCountersResponse resp =
    recordFactory.newRecordInstance(GetCountersResponse.class);
  Counters counters = recordFactory.newRecordInstance(Counters.class);
  counters.addAllCounterGroups(new HashMap<String, CounterGroup>());
  resp.setCounters(counters);
  return resp;
}
 
源代码20 项目: tez   文件: NotRunningJob.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  GetCountersResponse resp =
    recordFactory.newRecordInstance(GetCountersResponse.class);
  Counters counters = recordFactory.newRecordInstance(Counters.class);
  counters.addAllCounterGroups(new HashMap<String, CounterGroup>());
  resp.setCounters(counters);
  return resp;
}
 
源代码21 项目: hadoop   文件: TestRPCFactories.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  return null;
}
 
源代码22 项目: big-c   文件: TestRPCFactories.java
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
    throws IOException {
  return null;
}
 
源代码23 项目: hadoop   文件: MRClientProtocol.java
public GetCountersResponse getCounters(GetCountersRequest request) throws IOException; 
源代码24 项目: big-c   文件: MRClientProtocol.java
public GetCountersResponse getCounters(GetCountersRequest request) throws IOException; 
 类方法
 同包方法