org.apache.hadoop.yarn.api.ApplicationClientProtocol.getApplicationAttemptReport()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中org.apache.hadoop.yarn.api.ApplicationClientProtocol.getApplicationAttemptReport()方法的一些代码示例,展示了ApplicationClientProtocol.getApplicationAttemptReport()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationClientProtocol.getApplicationAttemptReport()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.ApplicationClientProtocol
类名称:ApplicationClientProtocol
方法名:getApplicationAttemptReport

ApplicationClientProtocol.getApplicationAttemptReport介绍

暂无

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-router

@Override
public GetApplicationAttemptReportResponse getApplicationAttemptReport(
  GetApplicationAttemptReportRequest request)
  throws YarnException, IOException {
 return clientRMProxy.getApplicationAttemptReport(request);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-client

@Override
public ApplicationAttemptReport getApplicationAttemptReport(
  ApplicationAttemptId appAttemptId) throws YarnException, IOException {
 try {
  GetApplicationAttemptReportRequest request = Records
    .newRecord(GetApplicationAttemptReportRequest.class);
  request.setApplicationAttemptId(appAttemptId);
  GetApplicationAttemptReportResponse response = rmClient
    .getApplicationAttemptReport(request);
  return response.getApplicationAttemptReport();
 } catch (YarnException e) {
  if (!historyServiceEnabled) {
   // Just throw it as usual if historyService is not enabled.
   throw e;
  }
  // Even if history-service is enabled, treat all exceptions still the same
  // except the following
  if (e.getClass() != ApplicationNotFoundException.class) {
   throw e;
  }
  return historyClient.getApplicationAttemptReport(appAttemptId);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-client

@Override
public ApplicationAttemptReport getApplicationAttemptReport(
  ApplicationAttemptId appAttemptId) throws YarnException, IOException {
 try {
  GetApplicationAttemptReportRequest request = Records
    .newRecord(GetApplicationAttemptReportRequest.class);
  request.setApplicationAttemptId(appAttemptId);
  GetApplicationAttemptReportResponse response = rmClient
    .getApplicationAttemptReport(request);
  return response.getApplicationAttemptReport();
 } catch (YarnException e) {
  if (!historyServiceEnabled) {
   // Just throw it as usual if historyService is not enabled.
   throw e;
  }
  // Even if history-service is enabled, treat all exceptions still the same
  // except the following
  if (e.getClass() != ApplicationNotFoundException.class) {
   throw e;
  }
  return historyClient.getApplicationAttemptReport(appAttemptId);
 }
}

代码示例来源:origin: io.hops/hadoop-yarn-client

@Override
public ApplicationAttemptReport getApplicationAttemptReport(
  ApplicationAttemptId appAttemptId) throws YarnException, IOException {
 try {
  GetApplicationAttemptReportRequest request = Records
    .newRecord(GetApplicationAttemptReportRequest.class);
  request.setApplicationAttemptId(appAttemptId);
  GetApplicationAttemptReportResponse response = rmClient
    .getApplicationAttemptReport(request);
  return response.getApplicationAttemptReport();
 } catch (YarnException e) {
  if (!historyServiceEnabled) {
   // Just throw it as usual if historyService is not enabled.
   throw e;
  }
  // Even if history-service is enabled, treat all exceptions still the same
  // except the following
  if (e.getClass() != ApplicationNotFoundException.class) {
   throw e;
  }
  return historyClient.getApplicationAttemptReport(appAttemptId);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-client

@Override
public ApplicationAttemptReport getApplicationAttemptReport(
  ApplicationAttemptId appAttemptId) throws YarnException, IOException {
 try {
  GetApplicationAttemptReportRequest request = Records
    .newRecord(GetApplicationAttemptReportRequest.class);
  request.setApplicationAttemptId(appAttemptId);
  GetApplicationAttemptReportResponse response = rmClient
    .getApplicationAttemptReport(request);
  return response.getApplicationAttemptReport();
 } catch (YarnException e) {
  if (!historyServiceEnabled) {
   // Just throw it as usual if historyService is not enabled.
   throw e;
  }
  // Even if history-service is enabled, treat all exceptions still the same
  // except the following
  if (e.getClass() != ApplicationNotFoundException.class) {
   throw e;
  }
  return historyClient.getApplicationAttemptReport(appAttemptId);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Override
public GetApplicationAttemptReportResponseProto getApplicationAttemptReport(
  RpcController controller, GetApplicationAttemptReportRequestProto proto)
  throws ServiceException {
 GetApplicationAttemptReportRequestPBImpl request =
   new GetApplicationAttemptReportRequestPBImpl(proto);
 try {
  GetApplicationAttemptReportResponse response =
    real.getApplicationAttemptReport(request);
  return ((GetApplicationAttemptReportResponsePBImpl) response).getProto();
 } catch (YarnException e) {
  throw new ServiceException(e);
 } catch (IOException e) {
  throw new ServiceException(e);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

@Override
public GetApplicationAttemptReportResponseProto getApplicationAttemptReport(
  RpcController controller, GetApplicationAttemptReportRequestProto proto)
  throws ServiceException {
 GetApplicationAttemptReportRequestPBImpl request =
   new GetApplicationAttemptReportRequestPBImpl(proto);
 try {
  GetApplicationAttemptReportResponse response =
    real.getApplicationAttemptReport(request);
  return ((GetApplicationAttemptReportResponsePBImpl) response).getProto();
 } catch (YarnException e) {
  throw new ServiceException(e);
 } catch (IOException e) {
  throw new ServiceException(e);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

@Override
public GetApplicationAttemptReportResponseProto getApplicationAttemptReport(
  RpcController controller, GetApplicationAttemptReportRequestProto proto)
  throws ServiceException {
 GetApplicationAttemptReportRequestPBImpl request =
   new GetApplicationAttemptReportRequestPBImpl(proto);
 try {
  GetApplicationAttemptReportResponse response =
    real.getApplicationAttemptReport(request);
  return ((GetApplicationAttemptReportResponsePBImpl) response).getProto();
 } catch (YarnException e) {
  throw new ServiceException(e);
 } catch (IOException e) {
  throw new ServiceException(e);
 }
}

相关文章

微信公众号

最新文章

更多

ApplicationClientProtocol类方法