Exemplo n.º 1
0
 public virtual void AddApplication(ApplicationId applicationId, string queue, string
                                    user, bool isAppRecovering)
 {
     lock (this)
     {
         SchedulerApplication <FiCaSchedulerApp> application = new SchedulerApplication <FiCaSchedulerApp
                                                                                         >(DefaultQueue, user);
         applications[applicationId] = application;
         metrics.SubmitApp(user);
         Log.Info("Accepted application " + applicationId + " from user: "******", currently num of applications: "
                  + applications.Count);
         if (isAppRecovering)
         {
             if (Log.IsDebugEnabled())
             {
                 Log.Debug(applicationId + " is recovering. Skip notifying APP_ACCEPTED");
             }
         }
         else
         {
             rmContext.GetDispatcher().GetEventHandler().Handle(new RMAppEvent(applicationId,
                                                                               RMAppEventType.AppAccepted));
         }
     }
 }