org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb
Class RegisterNodeManagerRequestPBImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerRequest
      extended by org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb.RegisterNodeManagerRequestPBImpl

public class RegisterNodeManagerRequestPBImpl
extends RegisterNodeManagerRequest


Constructor Summary
RegisterNodeManagerRequestPBImpl()
           
RegisterNodeManagerRequestPBImpl(YarnServerCommonServiceProtos.RegisterNodeManagerRequestProto proto)
           
 
Method Summary
 boolean equals(Object other)
           
 int getHttpPort()
           
 List<NMContainerStatus> getNMContainerStatuses()
           
 String getNMVersion()
           
 org.apache.hadoop.yarn.api.records.NodeId getNodeId()
           
 YarnServerCommonServiceProtos.RegisterNodeManagerRequestProto getProto()
           
 org.apache.hadoop.yarn.api.records.Resource getResource()
           
 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.
 int hashCode()
           
 void setContainerStatuses(List<NMContainerStatus> containerReports)
           
 void setHttpPort(int httpPort)
           
 void setNMVersion(String version)
           
 void setNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId)
           
 void setResource(org.apache.hadoop.yarn.api.records.Resource resource)
           
 void setRunningApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> apps)
          Setter for RegisterNodeManagerRequest.getRunningApplications()
 
Methods inherited from class org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerRequest
newInstance
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisterNodeManagerRequestPBImpl

public RegisterNodeManagerRequestPBImpl()

RegisterNodeManagerRequestPBImpl

public RegisterNodeManagerRequestPBImpl(YarnServerCommonServiceProtos.RegisterNodeManagerRequestProto proto)
Method Detail

getProto

public YarnServerCommonServiceProtos.RegisterNodeManagerRequestProto getProto()

getResource

public org.apache.hadoop.yarn.api.records.Resource getResource()
Specified by:
getResource in class RegisterNodeManagerRequest

setResource

public void setResource(org.apache.hadoop.yarn.api.records.Resource resource)
Specified by:
setResource in class RegisterNodeManagerRequest

getNodeId

public org.apache.hadoop.yarn.api.records.NodeId getNodeId()
Specified by:
getNodeId in class RegisterNodeManagerRequest

setNodeId

public void setNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId)
Specified by:
setNodeId in class RegisterNodeManagerRequest

getHttpPort

public int getHttpPort()
Specified by:
getHttpPort in class RegisterNodeManagerRequest

setHttpPort

public void setHttpPort(int httpPort)
Specified by:
setHttpPort in class RegisterNodeManagerRequest

getRunningApplications

public List<org.apache.hadoop.yarn.api.records.ApplicationId> getRunningApplications()
Description copied from class: RegisterNodeManagerRequest
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

Specified by:
getRunningApplications in class RegisterNodeManagerRequest
Returns:
running application list in this node

setRunningApplications

public void setRunningApplications(List<org.apache.hadoop.yarn.api.records.ApplicationId> apps)
Description copied from class: RegisterNodeManagerRequest
Setter for RegisterNodeManagerRequest.getRunningApplications()

Specified by:
setRunningApplications in class RegisterNodeManagerRequest
Parameters:
apps - running application in this node

getNMContainerStatuses

public List<NMContainerStatus> getNMContainerStatuses()
Specified by:
getNMContainerStatuses in class RegisterNodeManagerRequest

setContainerStatuses

public void setContainerStatuses(List<NMContainerStatus> containerReports)
Specified by:
setContainerStatuses in class RegisterNodeManagerRequest

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

getNMVersion

public String getNMVersion()
Specified by:
getNMVersion in class RegisterNodeManagerRequest

setNMVersion

public void setNMVersion(String version)
Specified by:
setNMVersion in class RegisterNodeManagerRequest


Copyright © 2014 Apache Software Foundation. All Rights Reserved.