Class SubClusterId
java.lang.Object
org.apache.hadoop.yarn.server.federation.store.records.SubClusterId
- All Implemented Interfaces:
Comparable<SubClusterId>
- Direct Known Subclasses:
SubClusterIdPBImpl
@Private
@Unstable
public abstract class SubClusterId
extends Object
implements Comparable<SubClusterId>
SubClusterId represents the globally unique identifier for a subcluster that is participating in federation.
The globally unique nature of the identifier is obtained from the
FederationMembershipStateStore on initialization.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(SubClusterId other) booleanabstract StringgetId()Get the string identifier of the subcluster which is unique across the federated cluster.inthashCode()static SubClusterIdnewInstance(Integer subClusterId) static SubClusterIdnewInstance(String subClusterId) protected abstract voidSet the string identifier of the subcluster which is unique across the federated cluster.toString()
-
Constructor Details
-
SubClusterId
public SubClusterId()
-
-
Method Details
-
newInstance
-
newInstance
-
getId
Get the string identifier of the subcluster which is unique across the federated cluster. The identifier is static, i.e. preserved across restarts and failover.- Returns:
- unique identifier of the subcluster
-
setId
Set the string identifier of the subcluster which is unique across the federated cluster. The identifier is static, i.e. preserved across restarts and failover.- Parameters:
subClusterId- unique identifier of the subcluster
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<SubClusterId>
-
toString
-