AddToClusterNodeLabels(RpcController controller, YarnServerResourceManagerServiceProtos.AddToClusterNodeLabelsRequestProto
                               proto)
        {
            AddToClusterNodeLabelsRequestPBImpl request = new AddToClusterNodeLabelsRequestPBImpl
                                                              (proto);

            try
            {
                AddToClusterNodeLabelsResponse response = real.AddToClusterNodeLabels(request);
                return(((AddToClusterNodeLabelsResponsePBImpl)response).GetProto());
            }
            catch (YarnException e)
            {
                throw new ServiceException(e);
            }
            catch (IOException e)
            {
                throw new ServiceException(e);
            }
        }
예제 #2
0
        /// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/>
        /// <exception cref="System.IO.IOException"/>
        public virtual AddToClusterNodeLabelsResponse AddToClusterNodeLabels(AddToClusterNodeLabelsRequest
                                                                             request)
        {
            string argName            = "addToClusterNodeLabels";
            string msg                = "add labels.";
            UserGroupInformation user = CheckAcls(argName);

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

            try
            {
                rmContext.GetNodeLabelManager().AddToCluserNodeLabels(request.GetNodeLabels());
                RMAuditLogger.LogSuccess(user.GetShortUserName(), argName, "AdminService");
                return(response);
            }
            catch (IOException ioe)
            {
                throw LogAndWrapException(ioe, user.GetShortUserName(), argName, msg);
            }
        }