Class SubClusterHeartbeatRequest
java.lang.Object
org.apache.hadoop.yarn.server.federation.store.records.SubClusterHeartbeatRequest
- Direct Known Subclasses:
SubClusterHeartbeatRequestPBImpl
SubClusterHeartbeatRequest is a report of the runtime information of the subcluster that is participating in federation.
It includes information such as:
SubClusterId- The URL of the subcluster
- The timestamp representing the last start time of the subCluster
FederationsubClusterState- The current capacity and utilization of the subCluster
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringGet the current capacity and utilization of the subcluster.abstract longGet the last heart beat time of the subcluster.abstract SubClusterStategetState()Get theSubClusterStateof the subcluster.abstract SubClusterIdGet theSubClusterIdrepresenting the unique identifier of the subcluster.static SubClusterHeartbeatRequestnewInstance(SubClusterId subClusterId, long lastHeartBeat, SubClusterState state, String capability) static SubClusterHeartbeatRequestnewInstance(SubClusterId subClusterId, SubClusterState state, String capability) abstract voidsetCapability(String capability) Set the current capacity and utilization of the subCluster.abstract voidsetLastHeartBeat(long time) Set the last heartbeat time of the subcluster.abstract voidsetState(SubClusterState state) Set theSubClusterStateof the subcluster.abstract voidsetSubClusterId(SubClusterId subClusterId) Set theSubClusterIdrepresenting the unique identifier of the subCluster.toString()
-
Constructor Details
-
SubClusterHeartbeatRequest
public SubClusterHeartbeatRequest()
-
-
Method Details
-
newInstance
@Private @Unstable public static SubClusterHeartbeatRequest newInstance(SubClusterId subClusterId, SubClusterState state, String capability) -
newInstance
@Private @Unstable public static SubClusterHeartbeatRequest newInstance(SubClusterId subClusterId, long lastHeartBeat, SubClusterState state, String capability) -
getSubClusterId
Get theSubClusterIdrepresenting the unique identifier of the subcluster.- Returns:
- the subcluster identifier
-
setSubClusterId
Set theSubClusterIdrepresenting the unique identifier of the subCluster.- Parameters:
subClusterId- the subCluster identifier
-
getLastHeartBeat
@Public @Unstable public abstract long getLastHeartBeat()Get the last heart beat time of the subcluster.- Returns:
- the state of the subcluster
-
setLastHeartBeat
@Private @Unstable public abstract void setLastHeartBeat(long time) Set the last heartbeat time of the subcluster.- Parameters:
time- the last heartbeat time of the subcluster
-
getState
Get theSubClusterStateof the subcluster.- Returns:
- the state of the subcluster
-
setState
Set theSubClusterStateof the subcluster.- Parameters:
state- the state of the subCluster
-
getCapability
Get the current capacity and utilization of the subcluster. This is the JAXB marshalled string representation of theClusterMetrics.- Returns:
- the current capacity and utilization of the subcluster
-
setCapability
Set the current capacity and utilization of the subCluster. This is the JAXB marshalled string representation of theClusterMetrics.- Parameters:
capability- the current capacity and utilization of the subcluster
-
toString
-