当前位置: 首页>>代码示例>>Java>>正文


Java ApplicationReport.getHost方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.api.records.ApplicationReport.getHost方法的典型用法代码示例。如果您正苦于以下问题:Java ApplicationReport.getHost方法的具体用法?Java ApplicationReport.getHost怎么用?Java ApplicationReport.getHost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.api.records.ApplicationReport的用法示例。


在下文中一共展示了ApplicationReport.getHost方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AppInfo

import org.apache.hadoop.yarn.api.records.ApplicationReport; //导入方法依赖的package包/类
public AppInfo(ApplicationReport app) {
  appId = app.getApplicationId().toString();
  if (app.getCurrentApplicationAttemptId() != null) {
    currentAppAttemptId = app.getCurrentApplicationAttemptId().toString();
  }
  user = app.getUser();
  queue = app.getQueue();
  name = app.getName();
  type = app.getApplicationType();
  host = app.getHost();
  rpcPort = app.getRpcPort();
  appState = app.getYarnApplicationState();
  diagnosticsInfo = app.getDiagnostics();
  trackingUrl = app.getTrackingUrl();
  originalTrackingUrl = app.getOriginalTrackingUrl();
  submittedTime = app.getStartTime();
  startedTime = app.getStartTime();
  finishedTime = app.getFinishTime();
  elapsedTime = Times.elapsed(startedTime, finishedTime);
  finalAppStatus = app.getFinalApplicationStatus();
  progress = app.getProgress() * 100; // in percent
  if (app.getApplicationTags() != null && !app.getApplicationTags().isEmpty()) {
    this.applicationTags = CSV_JOINER.join(app.getApplicationTags());
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:AppInfo.java

示例2: getClusterSpec

import org.apache.hadoop.yarn.api.records.ApplicationReport; //导入方法依赖的package包/类
static ClusterSpec getClusterSpec(YarnClient client, ApplicationId appId) throws Exception {
  ClusterSpec clusterSpec = ClusterSpec.empty();
  ApplicationReport report = client.getApplicationReport(appId);
  YarnApplicationState state = report.getYarnApplicationState();
  if (state.equals(YarnApplicationState.RUNNING)) {
    String hostname = report.getHost();
    int port = report.getRpcPort();
    TFApplicationRpc rpc = TFApplicationRpcClient.getInstance(hostname, port);
    String spec = rpc.getClusterSpec();
    if (spec != null) {
      clusterSpec = ClusterSpec.fromJsonString(spec);
    }
  }
  return clusterSpec;
}
 
开发者ID:Intel-bigdata,项目名称:TensorFlowOnYARN,代码行数:16,代码来源:Client.java


注:本文中的org.apache.hadoop.yarn.api.records.ApplicationReport.getHost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。