public class AMRMTokenSecretManager extends SecretManager<AMRMTokenIdentifier>
SecretManager.InvalidToken
Constructor and Description |
---|
AMRMTokenSecretManager(Configuration conf)
Create an
AMRMTokenSecretManager |
Modifier and Type | Method and Description |
---|---|
void |
addPersistedPassword(Token<AMRMTokenIdentifier> token)
Populate persisted password of AMRMToken back to AMRMTokenSecretManager.
|
void |
applicationMasterFinished(ApplicationAttemptId appAttemptId) |
AMRMTokenIdentifier |
createIdentifier()
Creates an empty TokenId to be used for de-serializing an
AMRMTokenIdentifier by the RPC layer. |
byte[] |
createPassword(AMRMTokenIdentifier identifier)
Create a password for a given
AMRMTokenIdentifier . |
SecretKey |
getMasterKey() |
byte[] |
retrievePassword(AMRMTokenIdentifier identifier)
Retrieve the password for the given
AMRMTokenIdentifier . |
void |
setMasterKey(SecretKey masterKey) |
void |
start() |
void |
stop() |
checkAvailableForRead, createPassword, createSecretKey, generateSecret
public AMRMTokenSecretManager(Configuration conf)
AMRMTokenSecretManager
public void start()
public void stop()
public void applicationMasterFinished(ApplicationAttemptId appAttemptId)
@InterfaceAudience.Private public void setMasterKey(SecretKey masterKey)
@InterfaceAudience.Private public SecretKey getMasterKey()
public byte[] createPassword(AMRMTokenIdentifier identifier)
AMRMTokenIdentifier
. Used to
send to the AppicationAttempt which can give it back during authentication.createPassword
in class SecretManager<AMRMTokenIdentifier>
identifier
- the identifier to usepublic void addPersistedPassword(Token<AMRMTokenIdentifier> token) throws IOException
IOException
public byte[] retrievePassword(AMRMTokenIdentifier identifier) throws SecretManager.InvalidToken
AMRMTokenIdentifier
.
Used by RPC layer to validate a remote AMRMTokenIdentifier
.retrievePassword
in class SecretManager<AMRMTokenIdentifier>
identifier
- the identifier to validateSecretManager.InvalidToken
- the token was invalidpublic AMRMTokenIdentifier createIdentifier()
AMRMTokenIdentifier
by the RPC layer.createIdentifier
in class SecretManager<AMRMTokenIdentifier>
Copyright © 2013 Apache Software Foundation. All rights reserved.