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.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public int addMasterKey(String s)
DelegationTokenStore
addMasterKey
in interface DelegationTokenStore
public void updateMasterKey(int keySeq, String s)
DelegationTokenStore
updateMasterKey
in interface DelegationTokenStore
public boolean removeMasterKey(int keySeq)
DelegationTokenStore
removeMasterKey
in interface DelegationTokenStore
public String[] getMasterKeys()
DelegationTokenStore
getMasterKeys
in interface DelegationTokenStore
public boolean addToken(DelegationTokenIdentifier tokenIdentifier, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation token)
DelegationTokenStore
addToken
in interface DelegationTokenStore
public boolean removeToken(DelegationTokenIdentifier tokenIdentifier)
DelegationTokenStore
removeToken
in interface DelegationTokenStore
public org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation getToken(DelegationTokenIdentifier tokenIdentifier)
DelegationTokenStore
getToken
in interface DelegationTokenStore
public List<DelegationTokenIdentifier> getAllDelegationTokenIdentifiers()
DelegationTokenStore
getAllDelegationTokenIdentifiers
in interface DelegationTokenStore
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void init(Object hmsHandler, HadoopThriftAuthBridge.Server.ServerMode smode) throws DelegationTokenStore.TokenStoreException
init
in interface DelegationTokenStore
hmsHandler
- ObjectStore used by DBTokenStoresmode
- Indicate whether this is a metastore or hiveserver2 token storeDelegationTokenStore.TokenStoreException
Copyright © 2017 The Apache Software Foundation. All rights reserved.