コード例 #1
0
        public static AllocateResponse NewInstance(int responseId, IList <ContainerStatus>
                                                   completedContainers, IList <Container> allocatedContainers, IList <NodeReport> updatedNodes
                                                   , Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage
                                                   preempt, IList <NMToken> nmTokens, Token amRMToken, IList <ContainerResourceIncrease
                                                                                                              > increasedContainers, IList <ContainerResourceDecrease> decreasedContainers)
        {
            AllocateResponse response = NewInstance(responseId, completedContainers, allocatedContainers
                                                    , updatedNodes, availResources, command, numClusterNodes, preempt, nmTokens, increasedContainers
                                                    , decreasedContainers);

            response.SetAMRMToken(amRMToken);
            return(response);
        }
コード例 #2
0
        public static AllocateResponse NewInstance(int responseId, IList <ContainerStatus>
                                                   completedContainers, IList <Container> allocatedContainers, IList <NodeReport> updatedNodes
                                                   , Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage
                                                   preempt, IList <NMToken> nmTokens)
        {
            AllocateResponse response = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <AllocateResponse
                                                                                       >();

            response.SetNumClusterNodes(numClusterNodes);
            response.SetResponseId(responseId);
            response.SetCompletedContainersStatuses(completedContainers);
            response.SetAllocatedContainers(allocatedContainers);
            response.SetUpdatedNodes(updatedNodes);
            response.SetAvailableResources(availResources);
            response.SetAMCommand(command);
            response.SetPreemptionMessage(preempt);
            response.SetNMTokens(nmTokens);
            return(response);
        }