Exemplo n.º 1
0
        /// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/>
        /// <exception cref="Org.Apache.Hadoop.Ipc.StandbyException"/>
        public virtual RefreshQueuesResponse RefreshQueues(RefreshQueuesRequest request)
        {
            string argName            = "refreshQueues";
            string msg                = "refresh queues.";
            UserGroupInformation user = CheckAcls(argName);

            CheckRMStatus(user.GetShortUserName(), argName, msg);
            RefreshQueuesResponse response = recordFactory.NewRecordInstance <RefreshQueuesResponse
                                                                              >();

            try
            {
                rmContext.GetScheduler().Reinitialize(GetConfig(), this.rmContext);
                // refresh the reservation system
                ReservationSystem rSystem = rmContext.GetReservationSystem();
                if (rSystem != null)
                {
                    rSystem.Reinitialize(GetConfig(), rmContext);
                }
                RMAuditLogger.LogSuccess(user.GetShortUserName(), argName, "AdminService");
                return(response);
            }
            catch (IOException ioe)
            {
                throw LogAndWrapException(ioe, user.GetShortUserName(), argName, msg);
            }
        }