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 Details

    • SubClusterId

      public SubClusterId()
  • Method Details

    • newInstance

      @Private @Unstable public static SubClusterId newInstance(String subClusterId)
    • newInstance

      @Private @Unstable public static SubClusterId newInstance(Integer subClusterId)
    • getId

      @Public @Unstable public abstract String 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

      @Private @Unstable protected abstract void setId(String subClusterId)
      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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(SubClusterId other)
      Specified by:
      compareTo in interface Comparable<SubClusterId>
    • toString

      public String toString()
      Overrides:
      toString in class Object