Beispiel #1
0
 /// <exception cref="System.IO.IOException"/>
 /// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/>
 private int ReplaceLabelsOnNodes(IDictionary <NodeId, ICollection <string> > map)
 {
     if (directlyAccessNodeLabelStore)
     {
         GetNodeLabelManagerInstance(GetConf()).ReplaceLabelsOnNode(map);
     }
     else
     {
         ResourceManagerAdministrationProtocol adminProtocol = CreateAdminProtocol();
         ReplaceLabelsOnNodeRequest            request       = ReplaceLabelsOnNodeRequest.NewInstance(map);
         adminProtocol.ReplaceLabelsOnNode(request);
     }
     return(0);
 }
        ReplaceLabelsOnNodes(RpcController controller, YarnServerResourceManagerServiceProtos.ReplaceLabelsOnNodeRequestProto
                             proto)
        {
            ReplaceLabelsOnNodeRequestPBImpl request = new ReplaceLabelsOnNodeRequestPBImpl(proto
                                                                                            );

            try
            {
                ReplaceLabelsOnNodeResponse response = real.ReplaceLabelsOnNode(request);
                return(((ReplaceLabelsOnNodeResponsePBImpl)response).GetProto());
            }
            catch (YarnException e)
            {
                throw new ServiceException(e);
            }
            catch (IOException e)
            {
                throw new ServiceException(e);
            }
        }