• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RMAppAttempt类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt的典型用法代码示例。如果您正苦于以下问题:Java RMAppAttempt类的具体用法?Java RMAppAttempt怎么用?Java RMAppAttempt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RMAppAttempt类属于org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt包,在下文中一共展示了RMAppAttempt类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: AppAttemptInfo

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
public AppAttemptInfo(RMAppAttempt attempt, String user) {
  this.startTime = 0;
  this.containerId = "";
  this.nodeHttpAddress = "";
  this.nodeId = "";
  this.logsLink = "";
  if (attempt != null) {
    this.id = attempt.getAppAttemptId().getAttemptId();
    this.startTime = attempt.getStartTime();
    Container masterContainer = attempt.getMasterContainer();
    if (masterContainer != null) {
      this.containerId = masterContainer.getId().toString();
      this.nodeHttpAddress = masterContainer.getNodeHttpAddress();
      this.nodeId = masterContainer.getNodeId().toString();
      this.logsLink =
          WebAppUtils.getRunningLogURL("//" + masterContainer.getNodeHttpAddress(),
              ConverterUtils.toString(masterContainer.getId()), user);
    }
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:AppAttemptInfo.java


示例2: createAttemptHeadRoomTable

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
@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._();
    }
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:RMAppAttemptBlock.java


示例3: updateAttemptMetrics

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
private static void updateAttemptMetrics(RMContainerImpl container) {
  // If this is a preempted container, update preemption metrics
  Resource resource = container.getContainer().getResource();
  RMAppAttempt rmAttempt = container.rmContext.getRMApps()
      .get(container.getApplicationAttemptId().getApplicationId())
      .getCurrentAppAttempt();
  if (ContainerExitStatus.PREEMPTED == container.finishedStatus
    .getExitStatus()) {
    rmAttempt.getRMAppAttemptMetrics().updatePreemptionInfo(resource,
      container);
  }

  if (rmAttempt != null) {
    long usedMillis = container.finishTime - container.creationTime;
    long memorySeconds = resource.getMemory()
                          * usedMillis / DateUtils.MILLIS_PER_SECOND;
    long vcoreSeconds = resource.getVirtualCores()
                         * usedMillis / DateUtils.MILLIS_PER_SECOND;
    long gcoreSeconds = resource.getGpuCores()
                         * usedMillis / DateUtils.MILLIS_PER_SECOND;
    rmAttempt.getRMAppAttemptMetrics()
              .updateAggregateAppResourceUsage(memorySeconds,vcoreSeconds, gcoreSeconds);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:25,代码来源:RMContainerImpl.java


示例4: appAttemptFinished

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void appAttemptFinished(RMAppAttempt appAttempt,
    RMAppAttemptState appAttemtpState, RMApp app, long finishedTime) {
  if (publishSystemMetrics) {
    dispatcher.getEventHandler().handle(
        new AppAttemptFinishedEvent(
            appAttempt.getAppAttemptId(),
            appAttempt.getTrackingUrl(),
            appAttempt.getOriginalTrackingUrl(),
            appAttempt.getDiagnostics(),
            // app will get the final status from app attempt, or create one
            // based on app state if it doesn't exist
            app.getFinalApplicationStatus(),
            RMServerUtils.createApplicationAttemptState(appAttemtpState),
            finishedTime));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:SystemMetricsPublisher.java


示例5: storeAttempt

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
protected ContainerId storeAttempt(RMStateStore store,
    ApplicationAttemptId attemptId,
    String containerIdStr, Token<AMRMTokenIdentifier> appToken,
    SecretKey clientTokenMasterKey, TestDispatcher dispatcher)
    throws Exception {

  RMAppAttemptMetrics mockRmAppAttemptMetrics = 
      mock(RMAppAttemptMetrics.class);
  Container container = new ContainerPBImpl();
  container.setId(ConverterUtils.toContainerId(containerIdStr));
  RMAppAttempt mockAttempt = mock(RMAppAttempt.class);
  when(mockAttempt.getAppAttemptId()).thenReturn(attemptId);
  when(mockAttempt.getMasterContainer()).thenReturn(container);
  when(mockAttempt.getAMRMToken()).thenReturn(appToken);
  when(mockAttempt.getClientTokenMasterKey())
      .thenReturn(clientTokenMasterKey);
  when(mockAttempt.getRMAppAttemptMetrics())
      .thenReturn(mockRmAppAttemptMetrics);
  when(mockRmAppAttemptMetrics.getAggregateAppResourceUsage())
      .thenReturn(new AggregateAppResourceUsage(0, 0, 0));
  dispatcher.attemptId = attemptId;
  store.storeNewApplicationAttempt(mockAttempt);
  waitNotify(dispatcher);
  return container.getId();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:RMStateStoreTestBase.java


示例6: getNumFailedAppAttempts

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
private int getNumFailedAppAttempts() {
  int completedAttempts = 0;
  long endTime = this.systemClock.getTime();
  // Do not count AM preemption, hardware failures or NM resync
  // as attempt failure.
  for (RMAppAttempt attempt : attempts.values()) {
    if (attempt.shouldCountTowardsMaxAttemptRetry()) {
      if (this.attemptFailuresValidityInterval <= 0
          || (attempt.getFinishTime() > endTime
              - this.attemptFailuresValidityInterval)) {
        completedAttempts++;
      }
    }
  }
  return completedAttempts;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:RMAppImpl.java


示例7: handle

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
@Override
public void handle(RMAppAttemptEvent event) {
  ApplicationAttemptId appAttemptID = event.getApplicationAttemptId();
  ApplicationId appAttemptId = appAttemptID.getApplicationId();
  RMApp rmApp = this.rmContext.getRMApps().get(appAttemptId);
  if (rmApp != null) {
    RMAppAttempt rmAppAttempt = rmApp.getRMAppAttempt(appAttemptID);
    if (rmAppAttempt != null) {
      try {
        rmAppAttempt.handle(event);
      } catch (Throwable t) {
        LOG.error("Error in handling event type " + event.getType()
            + " for applicationAttempt " + appAttemptId, t);
      }
    }
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:ResourceManager.java


示例8: storeNewApplicationAttempt

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
@SuppressWarnings("unchecked")
/**
 * Non-blocking API
 * ResourceManager services call this to store state on an application attempt
 * This does not block the dispatcher threads
 * RMAppAttemptStoredEvent will be sent on completion to notify the RMAppAttempt
 */
public synchronized void storeNewApplicationAttempt(RMAppAttempt appAttempt) {
  Credentials credentials = getCredentialsFromAppAttempt(appAttempt);

  AggregateAppResourceUsage resUsage =
      appAttempt.getRMAppAttemptMetrics().getAggregateAppResourceUsage();
  ApplicationAttemptStateData attemptState =
      ApplicationAttemptStateData.newInstance(
          appAttempt.getAppAttemptId(),
          appAttempt.getMasterContainer(),
          credentials, appAttempt.getStartTime(),
          resUsage.getMemorySeconds(),
          resUsage.getVcoreSeconds(),resUsage.getGcoreSeconds());

  dispatcher.getEventHandler().handle(
    new RMStateStoreAppAttemptEvent(attemptState));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:24,代码来源:RMStateStore.java


示例9: testAppAttemptsHelper

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
public void testAppAttemptsHelper(String path, RMApp app, String media)
    throws JSONException, Exception {
  WebResource r = resource();
  ClientResponse response = r.path("ws").path("v1").path("cluster")
      .path("apps").path(path).path("appattempts").accept(media)
      .get(ClientResponse.class);
  assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType());
  JSONObject json = response.getEntity(JSONObject.class);
  assertEquals("incorrect number of elements", 1, json.length());
  JSONObject jsonAppAttempts = json.getJSONObject("appAttempts");
  assertEquals("incorrect number of elements", 1, jsonAppAttempts.length());
  JSONArray jsonArray = jsonAppAttempts.getJSONArray("appAttempt");

  Collection<RMAppAttempt> attempts = app.getAppAttempts().values();
  assertEquals("incorrect number of elements", attempts.size(),
      jsonArray.length());

  // Verify these parallel arrays are the same
  int i = 0;
  for (RMAppAttempt attempt : attempts) {
    verifyAppAttemptsInfo(jsonArray.getJSONObject(i), attempt, app.getUser());
    ++i;
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:25,代码来源:TestRMWebServicesApps.java


示例10: verifyAppAttemptsXML

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
public void verifyAppAttemptsXML(NodeList nodes, RMAppAttempt appAttempt,
    String user)
    throws JSONException, Exception {

  for (int i = 0; i < nodes.getLength(); i++) {
    Element element = (Element) nodes.item(i);

    verifyAppAttemptInfoGeneric(appAttempt,
        WebServicesTestUtils.getXmlInt(element, "id"),
        WebServicesTestUtils.getXmlLong(element, "startTime"),
        WebServicesTestUtils.getXmlString(element, "containerId"),
        WebServicesTestUtils.getXmlString(element, "nodeHttpAddress"),
        WebServicesTestUtils.getXmlString(element, "nodeId"),
        WebServicesTestUtils.getXmlString(element, "logsLink"), user);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:TestRMWebServicesApps.java


示例11: verifyAppAttemptInfoGeneric

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
public void verifyAppAttemptInfoGeneric(RMAppAttempt appAttempt, int id,
    long startTime, String containerId, String nodeHttpAddress, String nodeId,
    String logsLink, String user)
        throws JSONException, Exception {

  assertEquals("id doesn't match", appAttempt.getAppAttemptId()
      .getAttemptId(), id);
  assertEquals("startedTime doesn't match", appAttempt.getStartTime(),
      startTime);
  WebServicesTestUtils.checkStringMatch("containerId", appAttempt
      .getMasterContainer().getId().toString(), containerId);
  WebServicesTestUtils.checkStringMatch("nodeHttpAddress", appAttempt
      .getMasterContainer().getNodeHttpAddress(), nodeHttpAddress);
  WebServicesTestUtils.checkStringMatch("nodeId", appAttempt
      .getMasterContainer().getNodeId().toString(), nodeId);
  assertTrue("logsLink doesn't match", logsLink.startsWith("//"));
  assertTrue(
      "logsLink doesn't contain user info", logsLink.endsWith("/"
      + user));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:TestRMWebServicesApps.java


示例12: createRMApp

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
private static RMApp createRMApp(ApplicationId appId) {
  RMApp app = mock(RMApp.class);
  when(app.getApplicationId()).thenReturn(appId);
  when(app.getName()).thenReturn("test app");
  when(app.getApplicationType()).thenReturn("test app type");
  when(app.getUser()).thenReturn("test user");
  when(app.getQueue()).thenReturn("test queue");
  when(app.getSubmitTime()).thenReturn(Integer.MAX_VALUE + 1L);
  when(app.getStartTime()).thenReturn(Integer.MAX_VALUE + 2L);
  when(app.getFinishTime()).thenReturn(Integer.MAX_VALUE + 3L);
  when(app.getDiagnostics()).thenReturn(
      new StringBuilder("test diagnostics info"));
  RMAppAttempt appAttempt = mock(RMAppAttempt.class);
  when(appAttempt.getAppAttemptId()).thenReturn(
      ApplicationAttemptId.newInstance(appId, 1));
  when(app.getCurrentAppAttempt()).thenReturn(appAttempt);
  when(app.getFinalApplicationStatus()).thenReturn(
      FinalApplicationStatus.UNDEFINED);
  when(app.getRMAppMetrics()).thenReturn(
      new RMAppMetrics(null, 0, 0, Integer.MAX_VALUE, Long.MAX_VALUE, Long.MAX_VALUE));
  return app;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:23,代码来源:TestSystemMetricsPublisher.java


示例13: createRMAppAttempt

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
private static RMAppAttempt createRMAppAttempt(
    ApplicationAttemptId appAttemptId) {
  RMAppAttempt appAttempt = mock(RMAppAttempt.class);
  when(appAttempt.getAppAttemptId()).thenReturn(appAttemptId);
  when(appAttempt.getHost()).thenReturn("test host");
  when(appAttempt.getRpcPort()).thenReturn(-100);
  Container container = mock(Container.class);
  when(container.getId())
      .thenReturn(ContainerId.newContainerId(appAttemptId, 1));
  when(appAttempt.getMasterContainer()).thenReturn(container);
  when(appAttempt.getDiagnostics()).thenReturn("test diagnostics info");
  when(appAttempt.getTrackingUrl()).thenReturn("test tracking url");
  when(appAttempt.getOriginalTrackingUrl()).thenReturn(
      "test original tracking url");
  return appAttempt;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:TestSystemMetricsPublisher.java


示例14: testAppWithNoContainers

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
@Test (timeout = 30000)
public void testAppWithNoContainers() throws Exception {
  Logger rootLogger = LogManager.getRootLogger();
  rootLogger.setLevel(Level.DEBUG);
  MockRM rm = new MockRM(conf);
  rm.start();
  MockNM nm1 = rm.registerNode("h1:1234", 5120);
  
  RMApp app = rm.submitApp(2000);

  //kick the scheduling
  nm1.nodeHeartbeat(true);

  RMAppAttempt attempt = app.getCurrentAppAttempt();
  MockAM am = rm.sendAMLaunched(attempt.getAppAttemptId());
  am.registerAppAttempt();
  am.unregisterAppAttempt();
  nm1.nodeHeartbeat(attempt.getAppAttemptId(), 1, ContainerState.COMPLETE);
  am.waitForState(RMAppAttemptState.FINISHED);
  rm.stop();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:22,代码来源:TestRM.java


示例15: testMinimumAllocation

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
private void testMinimumAllocation(YarnConfiguration conf, int testAlloc)
    throws Exception {
  MockRM rm = new MockRM(conf);
  rm.start();

  // Register node1
  MockNM nm1 = rm.registerNode("127.0.0.1:1234", 6 * GB);

  // Submit an application
  RMApp app1 = rm.submitApp(testAlloc);

  // kick the scheduling
  nm1.nodeHeartbeat(true);
  RMAppAttempt attempt1 = app1.getCurrentAppAttempt();
  MockAM am1 = rm.sendAMLaunched(attempt1.getAppAttemptId());
  am1.registerAppAttempt();
  SchedulerNodeReport report_nm1 = rm.getResourceScheduler().getNodeReport(
      nm1.getNodeId());

  int checkAlloc =
      conf.getInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB);
  Assert.assertEquals(checkAlloc, report_nm1.getUsedResource().getMemory());

  rm.stop();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:TestFifoScheduler.java


示例16: createRMAppAttempt

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
private static RMAppAttempt createRMAppAttempt(
    ApplicationAttemptId appAttemptId) {
  RMAppAttempt appAttempt = mock(RMAppAttempt.class);
  when(appAttempt.getAppAttemptId()).thenReturn(appAttemptId);
  when(appAttempt.getHost()).thenReturn("test host");
  when(appAttempt.getRpcPort()).thenReturn(-100);
  Container container = mock(Container.class);
  when(container.getId())
    .thenReturn(ContainerId.newContainerId(appAttemptId, 1));
  when(appAttempt.getMasterContainer()).thenReturn(container);
  when(appAttempt.getDiagnostics()).thenReturn("test diagnostics info");
  when(appAttempt.getTrackingUrl()).thenReturn("test url");
  when(appAttempt.getFinalApplicationStatus()).thenReturn(
    FinalApplicationStatus.UNDEFINED);
  return appAttempt;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:TestRMApplicationHistoryWriter.java


示例17: waitForState

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
public void waitForState(ApplicationAttemptId attemptId, 
                         RMAppAttemptState finalState)
    throws Exception {
  RMApp app = getRMContext().getRMApps().get(attemptId.getApplicationId());
  Assert.assertNotNull("app shouldn't be null", app);
  RMAppAttempt attempt = app.getRMAppAttempt(attemptId);
  int timeoutSecs = 0;
  while (!finalState.equals(attempt.getAppAttemptState()) && timeoutSecs++ < 40) {
    System.out.println("AppAttempt : " + attemptId 
        + " State is : " + attempt.getAppAttemptState()
        + " Waiting for state : " + finalState);
    Thread.sleep(1000);
  }
  System.out.println("Attempt State is : " + attempt.getAppAttemptState());
  Assert.assertEquals("Attempt state is not correct (timedout)", finalState,
      attempt.getAppAttemptState());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:MockRM.java


示例18: waitForState

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
public void waitForState(RMAppAttemptState finalState) throws Exception {
  RMApp app = context.getRMApps().get(attemptId.getApplicationId());
  RMAppAttempt attempt = app.getRMAppAttempt(attemptId);
  int timeoutSecs = 0;
  while (!finalState.equals(attempt.getAppAttemptState())
      && timeoutSecs++ < 40) {
    System.out
        .println("AppAttempt : " + attemptId + " State is : " 
            + attempt.getAppAttemptState()
            + " Waiting for state : " + finalState);
    Thread.sleep(1000);
  }
  System.out.println("AppAttempt State is : " + attempt.getAppAttemptState());
  Assert.assertEquals("AppAttempt state is not correct (timedout)",
      finalState, attempt.getAppAttemptState());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:MockAM.java


示例19: createSchedulingRequest

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
protected ApplicationAttemptId createSchedulingRequest(
    int memory, int vcores, int gcores, String queueId, String userId, int numContainers,
    int priority) {
  ApplicationAttemptId id = createAppAttemptId(this.APP_ID++, this.ATTEMPT_ID++);
  scheduler.addApplication(id.getApplicationId(), queueId, userId, false);
  // This conditional is for testAclSubmitApplication where app is rejected
  // and no app is added.
  if (scheduler.getSchedulerApplications().containsKey(id.getApplicationId())) {
    scheduler.addApplicationAttempt(id, false, false);
  }
  List<ResourceRequest> ask = new ArrayList<ResourceRequest>();
  ResourceRequest request = createResourceRequest(memory, vcores, gcores, ResourceRequest.ANY,
      priority, numContainers, true);
  ask.add(request);

  RMApp rmApp = mock(RMApp.class);
  RMAppAttempt rmAppAttempt = mock(RMAppAttempt.class);
  when(rmApp.getCurrentAppAttempt()).thenReturn(rmAppAttempt);
  when(rmAppAttempt.getRMAppAttemptMetrics()).thenReturn(
      new RMAppAttemptMetrics(id, resourceManager.getRMContext()));
  resourceManager.getRMContext().getRMApps()
      .put(id.getApplicationId(), rmApp);

  scheduler.allocate(id, ask, new ArrayList<ContainerId>(), null, null);
  return id;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:FairSchedulerTestBase.java


示例20: handleNMContainerStatus

import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; //导入依赖的package包/类
/**
 * Helper method to handle received ContainerStatus. If this corresponds to
 * the completion of a master-container of a managed AM,
 * we call the handler for RMAppAttemptContainerFinishedEvent.
 */
@SuppressWarnings("unchecked")
@VisibleForTesting
void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) {
  ApplicationAttemptId appAttemptId =
      containerStatus.getContainerId().getApplicationAttemptId();
  RMApp rmApp =
      rmContext.getRMApps().get(appAttemptId.getApplicationId());
  if (rmApp == null) {
    LOG.error("Received finished container : "
        + containerStatus.getContainerId()
        + " for unknown application " + appAttemptId.getApplicationId()
        + " Skipping.");
    return;
  }

  if (rmApp.getApplicationSubmissionContext().getUnmanagedAM()) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Ignoring container completion status for unmanaged AM "
          + rmApp.getApplicationId());
    }
    return;
  }

  RMAppAttempt rmAppAttempt = rmApp.getRMAppAttempt(appAttemptId);
  Container masterContainer = rmAppAttempt.getMasterContainer();
  if (masterContainer.getId().equals(containerStatus.getContainerId())
      && containerStatus.getContainerState() == ContainerState.COMPLETE) {
    ContainerStatus status =
        ContainerStatus.newInstance(containerStatus.getContainerId(),
          containerStatus.getContainerState(), containerStatus.getDiagnostics(),
          containerStatus.getContainerExitStatus());
    // sending master container finished event.
    RMAppAttemptContainerFinishedEvent evt =
        new RMAppAttemptContainerFinishedEvent(appAttemptId, status,
            nodeId);
    rmContext.getDispatcher().getEventHandler().handle(evt);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:44,代码来源:ResourceTrackerService.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Instruction10x类代码示例发布时间:2022-05-22
下一篇:
Java CoordinateList类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap