@InterfaceAudience.Private @InterfaceStability.Unstable public class RMDelegationTokenSecretManager extends AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier> implements Recoverable
AbstractDelegationTokenSecretManager.DelegationTokenInformationSecretManager.InvalidToken| Modifier and Type | Field and Description |
|---|---|
protected RMContext |
rmContext |
allKeys, currentId, currentTokens, delegationTokenSequenceNumber, noInterruptsLock, running, storeTokenTrackingId| Constructor and Description |
|---|
RMDelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval,
RMContext rmContext)
Create a secret manager
|
| Modifier and Type | Method and Description |
|---|---|
RMDelegationTokenIdentifier |
createIdentifier()
Create an empty token identifier.
|
Set<DelegationKey> |
getAllMasterKeys() |
Map<RMDelegationTokenIdentifier,Long> |
getAllTokens() |
int |
getLatestDTSequenceNumber() |
void |
recover(RMStateStore.RMState rmState) |
protected void |
removeStoredMasterKey(DelegationKey key) |
protected void |
removeStoredToken(RMDelegationTokenIdentifier ident) |
protected void |
storeNewMasterKey(DelegationKey newKey) |
protected void |
storeNewToken(RMDelegationTokenIdentifier identifier,
long renewDate) |
protected void |
updateStoredToken(RMDelegationTokenIdentifier id,
long renewDate) |
addKey, addPersistedDelegationToken, cancelToken, createPassword, createSecretKey, getAllKeys, getTokenTrackingId, getTrackingIdIfEnabled, isRunning, logExpireToken, logUpdateMasterKey, renewToken, reset, retrievePassword, startThreads, stopThreads, verifyTokencheckAvailableForRead, createPassword, generateSecretprotected final RMContext rmContext
public RMDelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval,
RMContext rmContext)
delegationKeyUpdateInterval - the number of seconds for rolling new
secret keys.delegationTokenMaxLifetime - the maximum lifetime of the delegation
tokensdelegationTokenRenewInterval - how often the tokens must be reneweddelegationTokenRemoverScanInterval - how often the tokens are scanned
for expired tokenspublic RMDelegationTokenIdentifier createIdentifier()
SecretManagercreateIdentifier in class SecretManager<RMDelegationTokenIdentifier>protected void storeNewMasterKey(DelegationKey newKey)
storeNewMasterKey in class AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier>protected void removeStoredMasterKey(DelegationKey key)
removeStoredMasterKey in class AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier>protected void storeNewToken(RMDelegationTokenIdentifier identifier, long renewDate)
storeNewToken in class AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier>protected void updateStoredToken(RMDelegationTokenIdentifier id, long renewDate)
updateStoredToken in class AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier>protected void removeStoredToken(RMDelegationTokenIdentifier ident) throws IOException
removeStoredToken in class AbstractDelegationTokenSecretManager<RMDelegationTokenIdentifier>IOException@InterfaceAudience.Private public Set<DelegationKey> getAllMasterKeys()
@InterfaceAudience.Private public Map<RMDelegationTokenIdentifier,Long> getAllTokens()
@InterfaceAudience.Private public int getLatestDTSequenceNumber()
public void recover(RMStateStore.RMState rmState) throws Exception
recover in interface RecoverableExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.