Interface FederationMembershipStateStore

All Known Subinterfaces:
FederationStateStore
All Known Implementing Classes:
MemoryFederationStateStore, SQLFederationStateStore, ZookeeperFederationStateStore

@Private @Unstable public interface FederationMembershipStateStore
FederationMembershipStateStore maintains the state of all subcluster(s) as encapsulated by SubClusterInfo for all the subcluster(s) that are participating in federation.
  • Method Details

    • registerSubCluster

      SubClusterRegisterResponse registerSubCluster(SubClusterRegisterRequest registerSubClusterRequest) throws org.apache.hadoop.yarn.exceptions.YarnException
      Register a subcluster by publishing capabilities as represented by SubClusterInfo to indicate participation in federation. This is typically done during initialization or restart/failover of the subcluster's ResourceManager. Upon successful registration, an identifier for the subcluster which is unique across the federated cluster is returned. The identifier is static, i.e. preserved across restarts and failover.
      Parameters:
      registerSubClusterRequest - the capabilities of the subcluster that wants to participate in federation. The subcluster id is also specified in case registration is triggered by restart/failover
      Returns:
      response empty on successfully if registration was successful
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • deregisterSubCluster

      SubClusterDeregisterResponse deregisterSubCluster(SubClusterDeregisterRequest subClusterDeregisterRequest) throws org.apache.hadoop.yarn.exceptions.YarnException
      Deregister a subcluster identified by SubClusterId to change state in federation. This can be done to mark the sub cluster lost, deregistered, or decommissioned.
      Parameters:
      subClusterDeregisterRequest - - the request to deregister the sub-cluster from federation.
      Returns:
      response empty on successfully deregistering the subcluster state
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • subClusterHeartbeat

      SubClusterHeartbeatResponse subClusterHeartbeat(SubClusterHeartbeatRequest subClusterHeartbeatRequest) throws org.apache.hadoop.yarn.exceptions.YarnException
      Periodic heartbeat from a ResourceManager participating in federation to indicate liveliness. The heartbeat publishes the current capabilities as represented by SubClusterInfo of the subcluster. Currently response is empty if the operation was successful, if not an exception reporting reason for a failure.
      Parameters:
      subClusterHeartbeatRequest - the capabilities of the subcluster that wants to keep alive its participation in federation
      Returns:
      response currently empty on if heartbeat was successfully processed
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • getSubCluster

      GetSubClusterInfoResponse getSubCluster(GetSubClusterInfoRequest subClusterRequest) throws org.apache.hadoop.yarn.exceptions.YarnException
      Get the membership information of subcluster as identified by SubClusterId. The membership information includes the cluster endpoint and current capabilities as represented by SubClusterInfo.
      Parameters:
      subClusterRequest - the subcluster whose information is required
      Returns:
      the SubClusterInfo, or null if there is no mapping for the subcluster
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • getSubClusters

      GetSubClustersInfoResponse getSubClusters(GetSubClustersInfoRequest subClustersRequest) throws org.apache.hadoop.yarn.exceptions.YarnException
      Get the membership information of all the subclusters that are currently participating in federation. The membership information includes the cluster endpoint and current capabilities as represented by SubClusterInfo.
      Parameters:
      subClustersRequest - request for sub-clusters information
      Returns:
      a map of SubClusterInfo keyed by the SubClusterId
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails