Class ZookeeperFederationStateStore

java.lang.Object
org.apache.hadoop.yarn.server.federation.store.impl.ZookeeperFederationStateStore
All Implemented Interfaces:
FederationApplicationHomeSubClusterStore, FederationDelegationTokenStateStore, FederationMembershipStateStore, FederationPolicyStore, FederationReservationHomeSubClusterStore, FederationStateStore

public class ZookeeperFederationStateStore extends Object implements FederationStateStore
ZooKeeper implementation of FederationStateStore. The znode structure is as follows: ROOT_DIR_PATH |--- MEMBERSHIP | |----- SC1 | |----- SC2 |--- APPLICATION | |----- HIERARCHIES | | |----- 1 | | | |----- (#ApplicationId barring last character) | | | | | |----- APP Data | | | .... | | | | | |----- 2 | | | |----- (#ApplicationId barring last 2 characters) | | | | |----- (#Last 2 characters of ApplicationId) | | | | | |----- APP Data |--- POLICY | |----- QUEUE1 | |----- QUEUE1 |--- RESERVATION | |----- RESERVATION1 | |----- RESERVATION2 |--- ROUTER_RM_DT_SECRET_MANAGER_ROOT | |----- ROUTER_RM_DELEGATION_TOKENS_ROOT | | |----- RM_DELEGATION_TOKEN_1 | | |----- RM_DELEGATION_TOKEN_2 | | |----- RM_DELEGATION_TOKEN_3 | |----- ROUTER_RM_DT_MASTER_KEYS_ROOT | | |----- DELEGATION_KEY_1 | |----- ROUTER_RM_DT_SEQUENTIAL_NUMBER
  • Field Details

    • ROOT_ZNODE_NAME_VERSION

      protected static final String ROOT_ZNODE_NAME_VERSION
      See Also:
    • ROUTER_APP_ROOT_HIERARCHIES

      @VisibleForTesting public static final String ROUTER_APP_ROOT_HIERARCHIES
      See Also:
    • CURRENT_VERSION_INFO

      protected static final Version CURRENT_VERSION_INFO
  • Constructor Details

    • ZookeeperFederationStateStore

      public ZookeeperFederationStateStore()
  • Method Details

    • init

      public void init(org.apache.hadoop.conf.Configuration conf) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationStateStore
      Initialize the FederationStore.
      Specified by:
      init in interface FederationStateStore
      Parameters:
      conf - the cluster configuration
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if initialization fails
    • close

      public void close() throws Exception
      Description copied from interface: FederationStateStore
      Perform any cleanup operations of the StateStore.
      Specified by:
      close in interface FederationStateStore
      Throws:
      Exception - if cleanup fails
    • addApplicationHomeSubCluster

      public AddApplicationHomeSubClusterResponse addApplicationHomeSubCluster(AddApplicationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Register the home SubClusterId of the newly submitted ApplicationId. Currently response is empty if the operation was successful, if not an exception reporting reason for a failure. If a mapping for the application already existed, the SubClusterId in this response will return the existing mapping which might be different from that in the AddApplicationHomeSubClusterRequest.
      Specified by:
      addApplicationHomeSubCluster in interface FederationApplicationHomeSubClusterStore
      Parameters:
      request - the request to register a new application with its home sub-cluster.
      Returns:
      upon successful registration of the application in the StateStore, AddApplicationHomeSubClusterRequest containing the home sub-cluster of the application. Otherwise, an exception reporting reason for a failure.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - indicates exceptions from yarn servers.
    • updateApplicationHomeSubCluster

      public UpdateApplicationHomeSubClusterResponse updateApplicationHomeSubCluster(UpdateApplicationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Update the home SubClusterId of a previously submitted ApplicationId. Currently response is empty if the operation was successful, if not an exception reporting reason for a failure.
      Specified by:
      updateApplicationHomeSubCluster in interface FederationApplicationHomeSubClusterStore
      Parameters:
      request - the request to update the home sub-cluster of an application.
      Returns:
      empty on successful update of the application in the StateStore, if not an exception reporting reason for a failure
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - indicates exceptions from yarn servers.
    • getApplicationHomeSubCluster

      public GetApplicationHomeSubClusterResponse getApplicationHomeSubCluster(GetApplicationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Get information about the application identified by the input ApplicationId.
      Specified by:
      getApplicationHomeSubCluster in interface FederationApplicationHomeSubClusterStore
      Parameters:
      request - contains the application queried
      Returns:
      ApplicationHomeSubCluster containing the application's home subcluster
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - indicates exceptions from yarn servers.
    • getApplicationsHomeSubCluster

      public GetApplicationsHomeSubClusterResponse getApplicationsHomeSubCluster(GetApplicationsHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Get the ApplicationHomeSubCluster list representing the mapping of all submitted applications to it's home sub-cluster.
      Specified by:
      getApplicationsHomeSubCluster in interface FederationApplicationHomeSubClusterStore
      Parameters:
      request - empty representing all applications
      Returns:
      the mapping of all submitted application to it's home sub-cluster
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - indicates exceptions from yarn servers.
    • deleteApplicationHomeSubCluster

      public DeleteApplicationHomeSubClusterResponse deleteApplicationHomeSubCluster(DeleteApplicationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Delete the mapping of home SubClusterId of a previously submitted ApplicationId. Currently response is empty if the operation was successful, if not an exception reporting reason for a failure.
      Specified by:
      deleteApplicationHomeSubCluster in interface FederationApplicationHomeSubClusterStore
      Parameters:
      request - the request to delete the home sub-cluster of an application.
      Returns:
      empty on successful update of the application in the StateStore, if not an exception reporting reason for a failure
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • registerSubCluster

      public SubClusterRegisterResponse registerSubCluster(SubClusterRegisterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationMembershipStateStore
      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.
      Specified by:
      registerSubCluster in interface FederationMembershipStateStore
      Parameters:
      request - 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

      public SubClusterDeregisterResponse deregisterSubCluster(SubClusterDeregisterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationMembershipStateStore
      Deregister a subcluster identified by SubClusterId to change state in federation. This can be done to mark the sub cluster lost, deregistered, or decommissioned.
      Specified by:
      deregisterSubCluster in interface FederationMembershipStateStore
      Parameters:
      request - - 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

      public SubClusterHeartbeatResponse subClusterHeartbeat(SubClusterHeartbeatRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationMembershipStateStore
      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.
      Specified by:
      subClusterHeartbeat in interface FederationMembershipStateStore
      Parameters:
      request - 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

      public GetSubClusterInfoResponse getSubCluster(GetSubClusterInfoRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationMembershipStateStore
      Get the membership information of subcluster as identified by SubClusterId. The membership information includes the cluster endpoint and current capabilities as represented by SubClusterInfo.
      Specified by:
      getSubCluster in interface FederationMembershipStateStore
      Parameters:
      request - 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

      public GetSubClustersInfoResponse getSubClusters(GetSubClustersInfoRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationMembershipStateStore
      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.
      Specified by:
      getSubClusters in interface FederationMembershipStateStore
      Parameters:
      request - 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
    • getPolicyConfiguration

      public GetSubClusterPolicyConfigurationResponse getPolicyConfiguration(GetSubClusterPolicyConfigurationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationPolicyStore
      Get the policy configuration for a given queue.
      Specified by:
      getPolicyConfiguration in interface FederationPolicyStore
      Parameters:
      request - the queue whose SubClusterPolicyConfiguration is required
      Returns:
      the SubClusterPolicyConfiguration for the specified queue, or null if there is no mapping for the queue
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • setPolicyConfiguration

      public SetSubClusterPolicyConfigurationResponse setPolicyConfiguration(SetSubClusterPolicyConfigurationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationPolicyStore
      Set the policy configuration for a given queue.
      Specified by:
      setPolicyConfiguration in interface FederationPolicyStore
      Parameters:
      request - the SubClusterPolicyConfiguration with the corresponding queue
      Returns:
      response empty on successfully updating the SubClusterPolicyConfiguration for the specified queue
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • getPoliciesConfigurations

      public GetSubClusterPoliciesConfigurationsResponse getPoliciesConfigurations(GetSubClusterPoliciesConfigurationsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationPolicyStore
      Get a map of all queue-to-policy configurations.
      Specified by:
      getPoliciesConfigurations in interface FederationPolicyStore
      Parameters:
      request - empty to represent all configured queues in the system
      Returns:
      the policies for all currently active queues in the system
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • deletePoliciesConfigurations

      public DeleteSubClusterPoliciesConfigurationsResponse deletePoliciesConfigurations(DeleteSubClusterPoliciesConfigurationsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationPolicyStore
      Delete PoliciesConfigurations.
      Specified by:
      deletePoliciesConfigurations in interface FederationPolicyStore
      Parameters:
      request - List containing delete queues.
      Returns:
      response empty means the queue list has been deleted successfully.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • deleteAllPoliciesConfigurations

      public DeletePoliciesConfigurationsResponse deleteAllPoliciesConfigurations(DeletePoliciesConfigurationsRequest request) throws Exception
      Description copied from interface: FederationPolicyStore
      Delete all queue-to-policy configurations.
      Specified by:
      deleteAllPoliciesConfigurations in interface FederationPolicyStore
      Parameters:
      request - delete request.
      Returns:
      If the response is empty, the queue-to-policy configurations are deleted successfully.
      Throws:
      Exception - if the request is invalid/fails
    • getCurrentVersion

      public Version getCurrentVersion()
      Description copied from interface: FederationStateStore
      Get the Version of the underlying federation state store client.
      Specified by:
      getCurrentVersion in interface FederationStateStore
      Returns:
      the Version of the underlying federation store client
    • loadVersion

      public Version loadVersion() throws Exception
      Description copied from interface: FederationStateStore
      Load the version information from the federation state store.
      Specified by:
      loadVersion in interface FederationStateStore
      Returns:
      the Version of the federation state store
      Throws:
      Exception - an exception occurred in load version.
    • storeVersion

      public void storeVersion() throws Exception
      Description copied from interface: FederationStateStore
      Store the Version information in federation state store.
      Specified by:
      storeVersion in interface FederationStateStore
      Throws:
      Exception - an exception occurred in store version.
    • deleteStateStore

      public void deleteStateStore() throws Exception
      Description copied from interface: FederationStateStore
      We will clear the data in stateStore through the deleteStateStore method.
      Specified by:
      deleteStateStore in interface FederationStateStore
      Throws:
      Exception - an exception occurred in delete store.
    • storeApplicationStateInternal

      protected void storeApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, byte[] data) throws Exception
      Throws:
      Exception
    • updateApplicationStateInternal

      protected void updateApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, byte[] data) throws Exception
      Throws:
      Exception
    • getOpDurations

      @VisibleForTesting public ZKFederationStateStoreOpDurations getOpDurations()
    • addReservationHomeSubCluster

      public AddReservationHomeSubClusterResponse addReservationHomeSubCluster(AddReservationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationReservationHomeSubClusterStore
      Register the home SubClusterId of the newly submitted ReservationId. Currently response is empty if the operation was successful, if not an exception reporting reason for a failure. If a mapping for the Reservation already existed, the SubClusterId in this response will return the existing mapping which might be different from that in the AddReservationHomeSubClusterRequest.
      Specified by:
      addReservationHomeSubCluster in interface FederationReservationHomeSubClusterStore
      Parameters:
      request - the request to register a new Reservation with its home sub-cluster
      Returns:
      upon successful registration of the Reservation in the StateStore, AddReservationHomeSubClusterRequest containing the home sub-cluster of the Reservation. Otherwise, an exception reporting reason for a failure
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • getReservationHomeSubCluster

      public GetReservationHomeSubClusterResponse getReservationHomeSubCluster(GetReservationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationReservationHomeSubClusterStore
      Get information about the Reservation identified by the input ReservationId.
      Specified by:
      getReservationHomeSubCluster in interface FederationReservationHomeSubClusterStore
      Parameters:
      request - contains the Reservation queried
      Returns:
      ReservationHomeSubCluster containing the Reservation's home subcluster
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • getReservationsHomeSubCluster

      public GetReservationsHomeSubClusterResponse getReservationsHomeSubCluster(GetReservationsHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationReservationHomeSubClusterStore
      Get the ReservationHomeSubCluster list representing the mapping of all submitted Reservations to it's home sub-cluster.
      Specified by:
      getReservationsHomeSubCluster in interface FederationReservationHomeSubClusterStore
      Parameters:
      request - empty representing all Reservations
      Returns:
      the mapping of all submitted Reservation to it's home sub-cluster
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • deleteReservationHomeSubCluster

      public DeleteReservationHomeSubClusterResponse deleteReservationHomeSubCluster(DeleteReservationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationReservationHomeSubClusterStore
      Delete the mapping of home SubClusterId of a previously submitted ReservationId. Currently response is empty if the operation was successful, if not an exception reporting reason for a failure.
      Specified by:
      deleteReservationHomeSubCluster in interface FederationReservationHomeSubClusterStore
      Parameters:
      request - the request to delete the home sub-cluster of a reservation.
      Returns:
      empty on successful update of the Reservation in the StateStore, if not an exception reporting reason for a failure
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • updateReservationHomeSubCluster

      public UpdateReservationHomeSubClusterResponse updateReservationHomeSubCluster(UpdateReservationHomeSubClusterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationReservationHomeSubClusterStore
      Update the home SubClusterId of a previously submitted ReservationId. Currently response is empty if the operation was successful, if not an exception reporting reason for a failure.
      Specified by:
      updateReservationHomeSubCluster in interface FederationReservationHomeSubClusterStore
      Parameters:
      request - the request to update the home sub-cluster of a reservation.
      Returns:
      empty on successful update of the Reservation in the StateStore, if not an exception reporting reason for a failure
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • storeNewMasterKey

      public RouterMasterKeyResponse storeNewMasterKey(RouterMasterKeyRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      ZookeeperFederationStateStore Supports Store NewMasterKey.
      Specified by:
      storeNewMasterKey in interface FederationDelegationTokenStateStore
      Parameters:
      request - The request contains RouterMasterKey, which is an abstraction for DelegationKey
      Returns:
      routerMasterKeyResponse, the response contains the RouterMasterKey.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessful.
      IOException - An IO Error occurred.
    • removeStoredMasterKey

      public RouterMasterKeyResponse removeStoredMasterKey(RouterMasterKeyRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      ZookeeperFederationStateStore Supports Remove MasterKey.
      Specified by:
      removeStoredMasterKey in interface FederationDelegationTokenStateStore
      Parameters:
      request - The request contains RouterMasterKey, which is an abstraction for DelegationKey
      Returns:
      routerMasterKeyResponse, the response contains the RouterMasterKey.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessful.
      IOException - An IO Error occurred.
    • getMasterKeyByDelegationKey

      public RouterMasterKeyResponse getMasterKeyByDelegationKey(RouterMasterKeyRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      ZookeeperFederationStateStore Supports Remove MasterKey.
      Specified by:
      getMasterKeyByDelegationKey in interface FederationDelegationTokenStateStore
      Parameters:
      request - The request contains RouterMasterKey, which is an abstraction for DelegationKey
      Returns:
      routerMasterKeyResponse, the response contains the RouterMasterKey.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessful.
      IOException - An IO Error occurred.
    • storeNewToken

      public RouterRMTokenResponse storeNewToken(RouterRMTokenRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      ZookeeperFederationStateStore Supports Store RMDelegationTokenIdentifier. The stored token method is a synchronized method used to ensure that storeNewToken is a thread-safe method.
      Specified by:
      storeNewToken in interface FederationDelegationTokenStateStore
      Parameters:
      request - The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
      Returns:
      routerRMTokenResponse, the response contains the RouterStoreToken.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessful.
      IOException - An IO Error occurred.
    • updateStoredToken

      public RouterRMTokenResponse updateStoredToken(RouterRMTokenRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      ZookeeperFederationStateStore Supports Update RMDelegationTokenIdentifier. The update stored token method is a synchronized method used to ensure that storeNewToken is a thread-safe method.
      Specified by:
      updateStoredToken in interface FederationDelegationTokenStateStore
      Parameters:
      request - The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
      Returns:
      routerRMTokenResponse, the response contains the RouterStoreToken.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessful.
      IOException - An IO Error occurred.
    • removeStoredToken

      public RouterRMTokenResponse removeStoredToken(RouterRMTokenRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      ZookeeperFederationStateStore Supports Remove RMDelegationTokenIdentifier. The remove stored token method is a synchronized method used to ensure that storeNewToken is a thread-safe method.
      Specified by:
      removeStoredToken in interface FederationDelegationTokenStateStore
      Parameters:
      request - The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
      Returns:
      routerRMTokenResponse, the response contains the RouterStoreToken.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessful.
      IOException - An IO Error occurred.
    • getTokenByRouterStoreToken

      public RouterRMTokenResponse getTokenByRouterStoreToken(RouterRMTokenRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      The Router Supports GetTokenByRouterStoreToken.
      Specified by:
      getTokenByRouterStoreToken in interface FederationDelegationTokenStateStore
      Parameters:
      request - The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
      Returns:
      RouterRMTokenResponse.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessful
      IOException - An IO Error occurred
    • incrementDelegationTokenSeqNum

      public int incrementDelegationTokenSeqNum()
      Increase SequenceNum. For zk, this is a distributed value. To ensure data consistency, we will use the synchronized keyword. For ZookeeperFederationStateStore, in order to reduce the interaction with ZK, we will apply for SequenceNum from ZK in batches(Apply when currentSeqNum >= currentMaxSeqNum), and assign this value to the variable currentMaxSeqNum. When calling the method incrementDelegationTokenSeqNum, if currentSeqNum < currentMaxSeqNum, we return ++currentMaxSeqNum, When currentSeqNum >= currentMaxSeqNum, we re-apply SequenceNum from zk.
      Specified by:
      incrementDelegationTokenSeqNum in interface FederationDelegationTokenStateStore
      Returns:
      SequenceNum.
    • getDelegationTokenSeqNum

      public int getDelegationTokenSeqNum()
      Get DelegationToken SeqNum.
      Specified by:
      getDelegationTokenSeqNum in interface FederationDelegationTokenStateStore
      Returns:
      delegationTokenSeqNum.
    • setDelegationTokenSeqNum

      public void setDelegationTokenSeqNum(int seqNum)
      Set DelegationToken SeqNum.
      Specified by:
      setDelegationTokenSeqNum in interface FederationDelegationTokenStateStore
      Parameters:
      seqNum - sequenceNum.
    • getCurrentKeyId

      public int getCurrentKeyId()
      Get Current KeyId.
      Specified by:
      getCurrentKeyId in interface FederationDelegationTokenStateStore
      Returns:
      currentKeyId.
    • incrementCurrentKeyId

      public int incrementCurrentKeyId()
      The Router Supports incrementCurrentKeyId.
      Specified by:
      incrementCurrentKeyId in interface FederationDelegationTokenStateStore
      Returns:
      CurrentKeyId.
    • resetOpDurations

      @VisibleForTesting public void resetOpDurations()