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); }
public override void SetAMCommand(AMCommand command) { lock (this) { MaybeInitBuilder(); if (command == null) { builder.ClearAMCommand(); return; } builder.SetAMCommand(ProtoUtils.ConvertToProtoFormat(command)); } }
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); }
public static AMCommand ConvertFromProtoFormat(YarnProtos.AMCommandProto e) { return(AMCommand.ValueOf(e.ToString())); }
/* * AMCommand */ public static YarnProtos.AMCommandProto ConvertToProtoFormat(AMCommand e) { return(YarnProtos.AMCommandProto.ValueOf(e.ToString())); }
public static AllocateResponse NewAllocateResponse(int responseId, IList <ContainerStatus > completedContainers, IList <Container> allocatedContainers, IList <NodeReport> updatedNodes , Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt) { AllocateResponse response = recordFactory.NewRecordInstance <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); return(response); }
public abstract void SetAMCommand(AMCommand command);