public virtual void AddApplicationAttempt(ApplicationAttemptId appAttemptId, bool transferStateFromPreviousAttempt, bool isAttemptRecovering) { lock (this) { SchedulerApplication <FiCaSchedulerApp> application = applications[appAttemptId.GetApplicationId ()]; string user = application.GetUser(); // TODO: Fix store FiCaSchedulerApp schedulerApp = new FiCaSchedulerApp(appAttemptId, user, DefaultQueue , activeUsersManager, this.rmContext); if (transferStateFromPreviousAttempt) { schedulerApp.TransferStateFromPreviousAttempt(application.GetCurrentAppAttempt()); } application.SetCurrentAppAttempt(schedulerApp); metrics.SubmitAppAttempt(user); Log.Info("Added Application Attempt " + appAttemptId + " to scheduler from user " + application.GetUser()); if (isAttemptRecovering) { if (Log.IsDebugEnabled()) { Log.Debug(appAttemptId + " is recovering. Skipping notifying ATTEMPT_ADDED"); } } else { rmContext.GetDispatcher().GetEventHandler().Handle(new RMAppAttemptEvent(appAttemptId , RMAppAttemptEventType.AttemptAdded)); } } }