Esempio 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);
            }
        }
Esempio n. 2
0
        public virtual void TestRefreshQueues()
        {
            RefreshQueuesRequest request = recordFactory.NewRecordInstance <RefreshQueuesRequest
                                                                            >();
            RefreshQueuesResponse response = client.RefreshQueues(request);

            NUnit.Framework.Assert.IsNotNull(response);
        }
        RefreshQueues(RpcController controller, YarnServerResourceManagerServiceProtos.RefreshQueuesRequestProto
                      proto)
        {
            RefreshQueuesRequestPBImpl request = new RefreshQueuesRequestPBImpl(proto);

            try
            {
                RefreshQueuesResponse response = real.RefreshQueues(request);
                return(((RefreshQueuesResponsePBImpl)response).GetProto());
            }
            catch (YarnException e)
            {
                throw new ServiceException(e);
            }
            catch (IOException e)
            {
                throw new ServiceException(e);
            }
        }