yarn app启动过程
CapacityScheduler.addApplication()
->RMAppImpl.handle() // .addTransition(RMAppState.SUBMITTED, RMAppState.ACCEPTED, RMAppEventType.APP_ACCEPTED, new StartAppAttemptTransition())
->RMAppImpl.StartAppAttemptTransition.transition()
->RMAppImpl.createAndStartNewAttempt()
->RMAppStartAttemptEvent.RMAppStartAttemptEvent()
->RMAppAttemptImpl.handle() // .addTransition(RMAppAttemptState.NEW, RMAppAttemptState.SUBMITTED, RMAppAttemptEventType.START, new AttemptStartedTransition())
->RMAppAttemptImpl.AttemptStartedTransition.transition()
->AppAttemptAddedSchedulerEvent.AppAttemptAddedSchedulerEvent()
->CapacityScheduler.handle() // SchedulerEventType.APP_ATTEMPT_ADDED
->CapacityScheduler.addApplicationAttempt()
->LeafQueue.submitApplicationAttempt()
->LeafQueue.addApplicationAttempt()
->LeafQueue.activateApplications()
->CapacityScheduler.addApplicationAttempt()
->RMAppAttemptImpl.handle() // .addTransition(RMAppAttemptState.SUBMITTED, EnumSet.of(RMAppAttemptState.LAUNCHED_UNMANAGED_SAVING, RMAppAttemptState.SCHEDULED), RMAppAttemptEventType.ATTEMPT_ADDED, new ScheduleTransition())
->RMAppAttemptImpl.ScheduleTransition.transition()