Class SubClusterHeartbeatRequest

java.lang.Object
org.apache.hadoop.yarn.server.federation.store.records.SubClusterHeartbeatRequest
Direct Known Subclasses:
SubClusterHeartbeatRequestPBImpl

@Private @Unstable public abstract class SubClusterHeartbeatRequest extends Object

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 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

      @Public @Unstable public abstract SubClusterId getSubClusterId()
      Get the SubClusterId representing the unique identifier of the subcluster.
      Returns:
      the subcluster identifier
    • setSubClusterId

      @Private @Unstable public abstract void setSubClusterId(SubClusterId subClusterId)
      Set the SubClusterId representing 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

      @Public @Unstable public abstract SubClusterState getState()
      Get the SubClusterState of the subcluster.
      Returns:
      the state of the subcluster
    • setState

      @Private @Unstable public abstract void setState(SubClusterState state)
      Set the SubClusterState of the subcluster.
      Parameters:
      state - the state of the subCluster
    • getCapability

      @Public @Unstable public abstract String getCapability()
      Get the current capacity and utilization of the subcluster. This is the JAXB marshalled string representation of the ClusterMetrics.
      Returns:
      the current capacity and utilization of the subcluster
    • setCapability

      @Private @Unstable public abstract void setCapability(String capability)
      Set the current capacity and utilization of the subCluster. This is the JAXB marshalled string representation of the ClusterMetrics.
      Parameters:
      capability - the current capacity and utilization of the subcluster
    • toString

      public String toString()
      Overrides:
      toString in class Object