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