Class RegisterNodeManagerRequest

java.lang.Object
org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerRequest
Direct Known Subclasses:
RegisterNodeManagerRequestPBImpl

public abstract class RegisterNodeManagerRequest extends Object
  • 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

      public abstract String getNMVersion()
    • getNMContainerStatuses

      public abstract List<NMContainerStatus> getNMContainerStatuses()
    • getNodeLabels

      public abstract Set<org.apache.hadoop.yarn.api.records.NodeLabel> getNodeLabels()
    • setNodeLabels

      public abstract void setNodeLabels(Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels)
    • getRunningApplications

      public abstract List<org.apache.hadoop.yarn.api.records.ApplicationId> 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

      public abstract void setNMVersion(String version)
    • setContainerStatuses

      public abstract void setContainerStatuses(List<NMContainerStatus> containerStatuses)
    • setRunningApplications

      public abstract void setRunningApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> runningApplications)
      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

      public abstract List<LogAggregationReport> getLogAggregationReportsForApps()
    • setLogAggregationReportsForApps

      public abstract void setLogAggregationReportsForApps(List<LogAggregationReport> logAggregationReportsForApps)
    • getNodeAttributes

      public abstract Set<org.apache.hadoop.yarn.api.records.NodeAttribute> getNodeAttributes()
    • setNodeAttributes

      public abstract void setNodeAttributes(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> nodeAttributes)
    • getNodeStatus

      public abstract NodeStatus getNodeStatus()
      Get the status of the node.
      Returns:
      The status of the node.
    • setNodeStatus

      public abstract void setNodeStatus(NodeStatus nodeStatus)
      Set the status of the node.
      Parameters:
      nodeStatus - The status of the node.