gpt4 book ai didi

org.apache.hadoop.yarn.api.records.YarnApplicationAttemptState.valueOf()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 02:58:40 26 4
gpt4 key购买 nike

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

YarnApplicationAttemptState.valueOf介绍

暂无

代码示例

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

public static YarnApplicationAttemptState convertFromProtoFormat(
  YarnApplicationAttemptStateProto e) {
 return YarnApplicationAttemptState.valueOf(e.name().replace(
   YARN_APPLICATION_ATTEMPT_STATE_PREFIX, ""));
}

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

public static YarnApplicationAttemptState convertFromProtoFormat(
  YarnApplicationAttemptStateProto e) {
 return YarnApplicationAttemptState.valueOf(e.name().replace(
   YARN_APPLICATION_ATTEMPT_STATE_PREFIX, ""));
}

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

public static YarnApplicationAttemptState convertFromProtoFormat(
  YarnApplicationAttemptStateProto e) {
 return YarnApplicationAttemptState.valueOf(e.name().replace(
   YARN_APPLICATION_ATTEMPT_STATE_PREFIX, ""));
}

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

.containsKey(AppAttemptMetricsConstants.STATE_EVENT_INFO)) {
state =
  YarnApplicationAttemptState.valueOf(eventInfo.get(
    AppAttemptMetricsConstants.STATE_EVENT_INFO)
    .toString());

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

.containsKey(AppAttemptMetricsConstants.STATE_EVENT_INFO)) {
state =
  YarnApplicationAttemptState.valueOf(eventInfo.get(
    AppAttemptMetricsConstants.STATE_EVENT_INFO)
    .toString());

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

.containsKey(AppAttemptMetricsConstants.STATE_INFO)) {
state =
  YarnApplicationAttemptState.valueOf(eventInfo.get(
    AppAttemptMetricsConstants.STATE_INFO)
    .toString());

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

@Override
public ApplicationAttemptReport createApplicationAttemptReport() {
 this.readLock.lock();
 ApplicationAttemptReport attemptReport = null;
 try {
  // AM container maybe not yet allocated. and also unmangedAM doesn't have
  // am container.
  ContainerId amId =
    masterContainer == null ? null : masterContainer.getId();
  attemptReport = ApplicationAttemptReport.newInstance(this
    .getAppAttemptId(), this.getHost(), this.getRpcPort(), this
    .getTrackingUrl(), this.getOriginalTrackingUrl(), this.getDiagnostics(),
    YarnApplicationAttemptState .valueOf(this.getState().toString()), amId);
 } finally {
  this.readLock.unlock();
 }
 return attemptReport;
}

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

@Override
public ApplicationAttemptReport createApplicationAttemptReport() {
 this.readLock.lock();
 ApplicationAttemptReport attemptReport = null;
 try {
  // AM container maybe not yet allocated. and also unmangedAM doesn't have
  // am container.
  ContainerId amId =
    masterContainer == null ? null : masterContainer.getId();
  attemptReport = ApplicationAttemptReport.newInstance(this
    .getAppAttemptId(), this.getHost(), this.getRpcPort(), this
    .getTrackingUrl(), this.getOriginalTrackingUrl(), this.getDiagnostics(),
    YarnApplicationAttemptState .valueOf(this.getState().toString()), amId);
 } finally {
  this.readLock.unlock();
 }
 return attemptReport;
}

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

@Override
protected void createAttemptHeadRoomTable(Block html) {
 RMAppAttempt attempt = getRMAppAttempt();
 if (attempt != null) {
  if (!isApplicationInFinalState(YarnApplicationAttemptState
    .valueOf(attempt.getAppAttemptState().toString()))) {
   RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics();
   DIV<Hamlet> pdiv = html._(InfoBlock.class).div(_INFO_WRAP);
   info("Application Attempt Overview").clear();
   info("Application Attempt Metrics")._(
    "Application Attempt Headroom : ", metrics == null ? "N/A" :
     metrics.getApplicationAttemptHeadroom());
   pdiv._();
  }
 }
}

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

@Override
protected void createAttemptHeadRoomTable(Block html) {
 RMAppAttempt attempt = getRMAppAttempt();
 if (attempt != null) {
  if (!isApplicationInFinalState(YarnApplicationAttemptState
    .valueOf(attempt.getAppAttemptState().toString()))) {
   RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics();
   DIV<Hamlet> pdiv = html.__(InfoBlock.class).div(_INFO_WRAP);
   info("Application Attempt Overview").clear();
   info("Application Attempt Metrics").__(
    "Application Attempt Headroom : ", metrics == null ? "N/A" :
     metrics.getApplicationAttemptHeadroom());
   pdiv.__();
  }
 }
}

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

@Override
protected void createAttemptHeadRoomTable(Block html) {
 RMAppAttempt attempt = getRMAppAttempt();
 if (attempt != null) {
  if (!isApplicationInFinalState(YarnApplicationAttemptState
    .valueOf(attempt.getAppAttemptState().toString()))) {
   RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics();
   DIV<Hamlet> pdiv = html._(InfoBlock.class).div(_INFO_WRAP);
   info("Application Attempt Overview").clear();
   info("Application Attempt Metrics")._(
    "Application Attempt Headroom : ", metrics == null ? "N/A" :
     metrics.getApplicationAttemptHeadroom());
   pdiv._();
  }
 }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com