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 Summary
Modifier and TypeMethodDescriptionderegisterSubCluster(SubClusterDeregisterRequest subClusterDeregisterRequest) Deregister a subcluster identified bySubClusterIdto change state in federation.getSubCluster(GetSubClusterInfoRequest subClusterRequest) Get the membership information of subcluster as identified bySubClusterId.getSubClusters(GetSubClustersInfoRequest subClustersRequest) Get the membership information of all the subclusters that are currently participating in federation.registerSubCluster(SubClusterRegisterRequest registerSubClusterRequest) Register a subcluster by publishing capabilities as represented bySubClusterInfoto indicate participation in federation.subClusterHeartbeat(SubClusterHeartbeatRequest subClusterHeartbeatRequest) Periodic heartbeat from aResourceManagerparticipating in federation to indicate liveliness.
-
Method Details
-
registerSubCluster
SubClusterRegisterResponse registerSubCluster(SubClusterRegisterRequest registerSubClusterRequest) throws org.apache.hadoop.yarn.exceptions.YarnException Register a subcluster by publishing capabilities as represented bySubClusterInfoto indicate participation in federation. This is typically done during initialization or restart/failover of the subcluster'sResourceManager. 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 bySubClusterIdto 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 aResourceManagerparticipating in federation to indicate liveliness. The heartbeat publishes the current capabilities as represented bySubClusterInfoof 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 bySubClusterId. The membership information includes the cluster endpoint and current capabilities as represented bySubClusterInfo.- Parameters:
subClusterRequest- the subcluster whose information is required- Returns:
- the
SubClusterInfo, ornullif 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 bySubClusterInfo.- Parameters:
subClustersRequest- request for sub-clusters information- Returns:
- a map of
SubClusterInfokeyed by theSubClusterId - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if the request is invalid/fails
-