Class RegisterNodeManagerRequest
java.lang.Object
org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerRequest
- Direct Known Subclasses:
RegisterNodeManagerRequestPBImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intabstract List<LogAggregationReport>abstract List<NMContainerStatus>abstract Stringabstract Set<org.apache.hadoop.yarn.api.records.NodeAttribute>abstract org.apache.hadoop.yarn.api.records.NodeIdabstract Set<org.apache.hadoop.yarn.api.records.NodeLabel>abstract NodeStatusGet the status of the node.abstract org.apache.hadoop.yarn.api.records.ResourceGet the physical resources in the node to properly estimate resource utilization.abstract org.apache.hadoop.yarn.api.records.Resourceabstract List<org.apache.hadoop.yarn.api.records.ApplicationId>We introduce this here because currently YARN RM doesn't persist nodes info for application running.static RegisterNodeManagerRequestnewInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications) static RegisterNodeManagerRequestnewInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications, Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels) static RegisterNodeManagerRequestnewInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications, Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels, org.apache.hadoop.yarn.api.records.Resource physicalResource) static RegisterNodeManagerRequestnewInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications, Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels, org.apache.hadoop.yarn.api.records.Resource physicalResource, Set<org.apache.hadoop.yarn.api.records.NodeAttribute> nodeAttributes, NodeStatus nodeStatus) abstract voidsetContainerStatuses(List<NMContainerStatus> containerStatuses) abstract voidsetHttpPort(int port) abstract voidsetLogAggregationReportsForApps(List<LogAggregationReport> logAggregationReportsForApps) abstract voidsetNMVersion(String version) abstract voidsetNodeAttributes(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> nodeAttributes) abstract voidsetNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId) abstract voidsetNodeLabels(Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels) abstract voidsetNodeStatus(NodeStatus nodeStatus) Set the status of the node.abstract voidsetPhysicalResource(org.apache.hadoop.yarn.api.records.Resource physicalResource) Set the physical resources in the node to properly estimate resource utilization.abstract voidsetResource(org.apache.hadoop.yarn.api.records.Resource resource) abstract voidsetRunningApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications) Setter forgetRunningApplications()
-
Constructor Details
-
RegisterNodeManagerRequest
public RegisterNodeManagerRequest()
-
-
Method Details
-
newInstance
public static RegisterNodeManagerRequest newInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications) -
newInstance
public static RegisterNodeManagerRequest newInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications, Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels) -
newInstance
public static RegisterNodeManagerRequest newInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications, Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels, org.apache.hadoop.yarn.api.records.Resource physicalResource) -
newInstance
public static RegisterNodeManagerRequest newInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, int httpPort, org.apache.hadoop.yarn.api.records.Resource resource, String nodeManagerVersionId, List<NMContainerStatus> containerStatuses, List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications, Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels, org.apache.hadoop.yarn.api.records.Resource physicalResource, Set<org.apache.hadoop.yarn.api.records.NodeAttribute> nodeAttributes, NodeStatus nodeStatus) -
getNodeId
public abstract org.apache.hadoop.yarn.api.records.NodeId getNodeId() -
getHttpPort
public abstract int getHttpPort() -
getResource
public abstract org.apache.hadoop.yarn.api.records.Resource getResource() -
getNMVersion
-
getNMContainerStatuses
-
getNodeLabels
-
setNodeLabels
-
getRunningApplications
We introduce this here because currently YARN RM doesn't persist nodes info for application running. When RM restart happened, we cannot determinate if a node should do application cleanup (like log-aggregation, status update, etc.) or not.When we have this running application list in node manager register request, we can recover nodes info for running applications. And then we can take actions accordingly
- Returns:
- running application list in this node
-
setNodeId
public abstract void setNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId) -
setHttpPort
public abstract void setHttpPort(int port) -
setResource
public abstract void setResource(org.apache.hadoop.yarn.api.records.Resource resource) -
setNMVersion
-
setContainerStatuses
-
setRunningApplications
public abstract void setRunningApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications) Setter forgetRunningApplications()- Parameters:
runningApplications- running application in this node
-
getPhysicalResource
public abstract org.apache.hadoop.yarn.api.records.Resource getPhysicalResource()Get the physical resources in the node to properly estimate resource utilization.- Returns:
- Physical resources in the node.
-
setPhysicalResource
public abstract void setPhysicalResource(org.apache.hadoop.yarn.api.records.Resource physicalResource) Set the physical resources in the node to properly estimate resource utilization.- Parameters:
physicalResource- Physical resources in the node.
-
getLogAggregationReportsForApps
-
setLogAggregationReportsForApps
public abstract void setLogAggregationReportsForApps(List<LogAggregationReport> logAggregationReportsForApps) -
getNodeAttributes
-
setNodeAttributes
public abstract void setNodeAttributes(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> nodeAttributes) -
getNodeStatus
Get the status of the node.- Returns:
- The status of the node.
-
setNodeStatus
Set the status of the node.- Parameters:
nodeStatus- The status of the node.
-