Examples of RMAppEvent


Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

        YarnConfiguration.RM_AM_MAX_ATTEMPTS,
        YarnConfiguration.DEFAULT_RM_AM_MAX_ATTEMPTS);
    assertTrue(maxAppAttempts > 1);
    int retriesLeft = maxAppAttempts;
    while (--retriesLeft > 0) {
      RMAppEvent event =
          new RMAppFailedAttemptEvent(app1.getApplicationId(),
              RMAppEventType.ATTEMPT_FAILED, "");
      app1.handle(event);
      rm.waitForState(app1.getApplicationId(), RMAppState.ACCEPTED);
      amNodeManager.nodeHeartbeat(true);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

    RMApp application =
        new RMAppImpl(applicationId, resourceManager.getRMContext(), conf, name, user,
          queue, submissionContext, scheduler, masterService,
          System.currentTimeMillis(), "YARN");
    resourceManager.getRMContext().getRMApps().putIfAbsent(applicationId, application);
    application.handle(new RMAppEvent(applicationId, RMAppEventType.START));

    final int MAX_TRIES=20;
    int numTries = 0;
    while (!application.getState().equals(RMAppState.SUBMITTED) &&
        numTries < MAX_TRIES) {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

    @SuppressWarnings("rawtypes")
    EventHandler eventHandler = new EventHandler() {
      @Override
      public void handle(Event rawEvent) {
        if (rawEvent instanceof RMAppEvent) {
          RMAppEvent event = (RMAppEvent) rawEvent;
          if (event.getApplicationId().equals(appId1)) {
            try {
              startBarrier.await();
              endBarrier.await();
            } catch (BrokenBarrierException e) {
              LOG.warn("Broken Barrier", e);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

          AuditConstants.KILL_APP_REQUEST, "ClientRMService", applicationId);
      return KillApplicationResponse.newInstance(true);
    }

    this.rmContext.getDispatcher().getEventHandler()
        .handle(new RMAppEvent(applicationId, RMAppEventType.KILL));

    // For UnmanagedAMs, return true so they don't retry
    return KillApplicationResponse.newInstance(
        application.getApplicationSubmissionContext().getUnmanagedAM());
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

        new SchedulerApplication<FiCaSchedulerApp>(queue, user);
    applications.put(applicationId, application);
    LOG.info("Accepted application " + applicationId + " from user: " + user
        + ", in queue: " + queueName);
    rmContext.getDispatcher().getEventHandler()
        .handle(new RMAppEvent(applicationId, RMAppEventType.APP_ACCEPTED));
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

      // Tell the app immediately that AM is unregistering so that app itself
      // can save its state as soon as possible. Whether we do it like this, or
      // we wait till AppAttempt is saved, it doesn't make any difference on the
      // app side w.r.t failure conditions. The only event going out of
      // AppAttempt to App after this point of time is AM/AppAttempt Finished.
      appAttempt.eventHandler.handle(new RMAppEvent(applicationId,
        RMAppEventType.ATTEMPT_UNREGISTERED));
      return RMAppAttemptState.FINAL_SAVING;
    }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

    LOG.info("Accepted application " + applicationId + " from user: " + user
        + ", in queue: " + queueName + ", currently num of applications: "
        + applications.size());
    rmContext.getDispatcher().getEventHandler()
        .handle(new RMAppEvent(applicationId, RMAppEventType.APP_ACCEPTED));
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

      // Tell the AMS. Unregister from the ApplicationMasterService
      appAttempt.masterService.unregisterAttempt(appAttemptId);

      // Tell the application and the scheduler
      ApplicationId applicationId = appAttemptId.getApplicationId();
      RMAppEvent appEvent = null;
      boolean keepContainersAcrossAppAttempts = false;
      switch (finalAttemptState) {
        case FINISHED:
        {
          appEvent = new RMAppFinishedAttemptEvent(applicationId,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

    applications.put(applicationId, application);
    metrics.submitApp(user);
    LOG.info("Accepted application " + applicationId + " from user: " + user
        + ", currently num of applications: " + applications.size());
    rmContext.getDispatcher().getEventHandler()
        .handle(new RMAppEvent(applicationId, RMAppEventType.APP_ACCEPTED));
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent

          sanitizeTrackingUrl(registrationEvent.getTrackingurl());
      appAttempt.proxiedTrackingUrl =
        appAttempt.generateProxyUriWithScheme(appAttempt.originalTrackingUrl);

      // Let the app know
      appAttempt.eventHandler.handle(new RMAppEvent(appAttempt
          .getAppAttemptId().getApplicationId(),
          RMAppEventType.ATTEMPT_REGISTERED));

      // TODO:FIXME: Note for future. Unfortunately we only do a state-store
      // write at AM launch time, so we don't save the AM's tracking URL anywhere
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.