public class MemoryTokenStore extends Object implements DelegationTokenStore
DelegationTokenStore.TokenStoreException| Constructor and Description |
|---|
MemoryTokenStore() |
| Modifier and Type | Method and Description |
|---|---|
int |
addMasterKey(String s)
Add new master key.
|
boolean |
addToken(DelegationTokenIdentifier tokenIdentifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation token)
Add token.
|
void |
close() |
List<DelegationTokenIdentifier> |
getAllDelegationTokenIdentifiers()
List of all token identifiers in the store.
|
org.apache.hadoop.conf.Configuration |
getConf() |
String[] |
getMasterKeys()
Return all master keys.
|
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation |
getToken(DelegationTokenIdentifier tokenIdentifier)
Get token.
|
void |
init(Object hmsHandler,
HadoopThriftAuthBridge.Server.ServerMode smode) |
boolean |
removeMasterKey(int keySeq)
Remove key for given id.
|
boolean |
removeToken(DelegationTokenIdentifier tokenIdentifier)
Remove token.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
updateMasterKey(int keySeq,
String s)
Update master key (for expiration and setting store assigned sequence within key)
|
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic int addMasterKey(String s)
DelegationTokenStoreaddMasterKey in interface DelegationTokenStorepublic void updateMasterKey(int keySeq,
String s)
DelegationTokenStoreupdateMasterKey in interface DelegationTokenStorepublic boolean removeMasterKey(int keySeq)
DelegationTokenStoreremoveMasterKey in interface DelegationTokenStorepublic String[] getMasterKeys()
DelegationTokenStoregetMasterKeys in interface DelegationTokenStorepublic boolean addToken(DelegationTokenIdentifier tokenIdentifier, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation token)
DelegationTokenStoreaddToken in interface DelegationTokenStorepublic boolean removeToken(DelegationTokenIdentifier tokenIdentifier)
DelegationTokenStoreremoveToken in interface DelegationTokenStorepublic org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation getToken(DelegationTokenIdentifier tokenIdentifier)
DelegationTokenStoregetToken in interface DelegationTokenStorepublic List<DelegationTokenIdentifier> getAllDelegationTokenIdentifiers()
DelegationTokenStoregetAllDelegationTokenIdentifiers in interface DelegationTokenStorepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void init(Object hmsHandler, HadoopThriftAuthBridge.Server.ServerMode smode) throws DelegationTokenStore.TokenStoreException
init in interface DelegationTokenStorehmsHandler - ObjectStore used by DBTokenStoresmode - Indicate whether this is a metastore or hiveserver2 token storeDelegationTokenStore.TokenStoreExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.