public class SQLDelegationTokenSecretManagerImpl
extends org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>
SQLDelegationTokenSecretManager that
persists TokenIdentifiers and DelegationKeys in a SQL database.
This implementation relies on the Datanucleus JDO PersistenceManager, which
can be configured with datanucleus.* configuration properties.DEFAULT_SEQ_NUM_BATCH_SIZE, SQL_DTSM_CONF_PREFIX, SQL_DTSM_TOKEN_LOADING_CACHE_EXPIRATION, SQL_DTSM_TOKEN_LOADING_CACHE_EXPIRATION_DEFAULT, SQL_DTSM_TOKEN_LOADING_CACHE_MAX_SIZE, SQL_DTSM_TOKEN_LOADING_CACHE_MAX_SIZE_DEFAULT, SQL_DTSM_TOKEN_MAX_CLEANUP_RESULTS, SQL_DTSM_TOKEN_MAX_CLEANUP_RESULTS_DEFAULT| Constructor | Description |
|---|---|
SQLDelegationTokenSecretManagerImpl(org.apache.hadoop.conf.Configuration conf) |
|
SQLDelegationTokenSecretManagerImpl(org.apache.hadoop.conf.Configuration conf,
SQLConnectionFactory connectionFactory,
SQLSecretManagerRetriableHandler retryHandler) |
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier |
createIdentifier() |
|
protected void |
deleteDelegationKey(int keyId) |
|
protected void |
deleteToken(int sequenceNum,
byte[] tokenIdentifier) |
|
protected SQLConnectionFactory |
getConnectionFactory() |
|
protected int |
incrementKeyId(int amount) |
|
protected int |
incrementSequenceNum(int amount) |
|
protected void |
insertDelegationKey(int keyId,
byte[] delegationKey) |
|
protected void |
insertToken(int sequenceNum,
byte[] tokenIdentifier,
byte[] tokenInfo) |
|
protected byte[] |
selectDelegationKey(int keyId) |
|
protected int |
selectKeyId() |
|
protected int |
selectSequenceNum() |
|
protected java.util.Map<byte[],byte[]> |
selectStaleTokenInfos(long maxModifiedTime,
int maxResults) |
|
protected byte[] |
selectTokenInfo(int sequenceNum,
byte[] tokenIdentifier) |
|
void |
stopThreads() |
|
protected void |
updateDelegationKey(int keyId,
byte[] delegationKey) |
|
protected void |
updateKeyId(int value) |
|
protected void |
updateSequenceNum(int value) |
|
protected void |
updateToken(int sequenceNum,
byte[] tokenIdentifier,
byte[] tokenInfo) |
cancelToken, getCandidateTokensForCleanup, getCurrentKeyId, getDelegationKey, getDelegationTokenSeqNum, getTokenInfoFromSQL, incrementCurrentKeyId, incrementDelegationTokenSeqNum, removeExpiredStoredToken, removeStoredMasterKey, removeStoredToken, setCurrentKeyId, setDelegationTokenSeqNum, storeDelegationKey, storeToken, updateDelegationKey, updateTokenaddKey, addPersistedDelegationToken, addTokenForOwnerStats, checkToken, createPassword, createSecretKey, decodeTokenIdentifier, getAllKeys, getCurrentTokensSize, getMetrics, getTokenInfo, getTokenRenewInterval, getTokenTrackingId, getTopTokenRealOwners, getTrackingIdIfEnabled, isRunning, logExpireToken, logExpireTokens, logUpdateMasterKey, renewToken, reset, retrievePassword, rollMasterKey, startThreads, storeNewMasterKey, storeNewToken, syncTokenOwnerStats, updateStoredToken, verifyTokenpublic SQLDelegationTokenSecretManagerImpl(org.apache.hadoop.conf.Configuration conf)
public SQLDelegationTokenSecretManagerImpl(org.apache.hadoop.conf.Configuration conf,
SQLConnectionFactory connectionFactory,
SQLSecretManagerRetriableHandler retryHandler)
public org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier createIdentifier()
createIdentifier in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>public void stopThreads()
stopThreads in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>protected void insertToken(int sequenceNum,
byte[] tokenIdentifier,
byte[] tokenInfo)
throws java.sql.SQLException
insertToken in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected void updateToken(int sequenceNum,
byte[] tokenIdentifier,
byte[] tokenInfo)
throws java.sql.SQLException
updateToken in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected void deleteToken(int sequenceNum,
byte[] tokenIdentifier)
throws java.sql.SQLException
deleteToken in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected byte[] selectTokenInfo(int sequenceNum,
byte[] tokenIdentifier)
throws java.sql.SQLException
selectTokenInfo in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected java.util.Map<byte[],byte[]> selectStaleTokenInfos(long maxModifiedTime,
int maxResults)
throws java.sql.SQLException
selectStaleTokenInfos in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected void insertDelegationKey(int keyId,
byte[] delegationKey)
throws java.sql.SQLException
insertDelegationKey in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected void updateDelegationKey(int keyId,
byte[] delegationKey)
throws java.sql.SQLException
updateDelegationKey in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected void deleteDelegationKey(int keyId)
throws java.sql.SQLException
deleteDelegationKey in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected byte[] selectDelegationKey(int keyId)
throws java.sql.SQLException
selectDelegationKey in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected int selectSequenceNum()
throws java.sql.SQLException
selectSequenceNum in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected void updateSequenceNum(int value)
throws java.sql.SQLException
updateSequenceNum in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected int incrementSequenceNum(int amount)
throws java.sql.SQLException
incrementSequenceNum in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected int selectKeyId()
throws java.sql.SQLException
selectKeyId in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected void updateKeyId(int value)
throws java.sql.SQLException
updateKeyId in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLExceptionprotected int incrementKeyId(int amount)
throws java.sql.SQLException
incrementKeyId in class org.apache.hadoop.security.token.delegation.SQLDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>java.sql.SQLException@VisibleForTesting protected SQLConnectionFactory getConnectionFactory()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.