org.apache.hadoop.yarn.server.security
Class BaseNMTokenSecretManager
java.lang.Object
org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>
org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager
public class BaseNMTokenSecretManager
- extends org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>
| Nested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager |
org.apache.hadoop.security.token.SecretManager.InvalidToken |
|
Method Summary |
org.apache.hadoop.yarn.security.NMTokenIdentifier |
createIdentifier()
It is required for RPC |
protected MasterKeyData |
createNewMasterKey()
|
org.apache.hadoop.yarn.api.records.Token |
createNMToken(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
org.apache.hadoop.yarn.api.records.NodeId nodeId,
String applicationSubmitter)
Helper function for creating NMTokens. |
protected byte[] |
createPassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
|
MasterKey |
getCurrentKey()
|
static org.apache.hadoop.yarn.api.records.Token |
newInstance(byte[] password,
org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
|
byte[] |
retrievePassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
|
protected byte[] |
retrivePasswordInternal(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier,
MasterKeyData masterKey)
|
| Methods inherited from class org.apache.hadoop.security.token.SecretManager |
checkAvailableForRead, createPassword, createSecretKey, generateSecret, retriableRetrievePassword |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialNo
protected int serialNo
readWriteLock
protected final ReadWriteLock readWriteLock
readLock
protected final Lock readLock
writeLock
protected final Lock writeLock
currentMasterKey
protected MasterKeyData currentMasterKey
BaseNMTokenSecretManager
public BaseNMTokenSecretManager()
createNewMasterKey
protected MasterKeyData createNewMasterKey()
getCurrentKey
@InterfaceAudience.Private
public MasterKey getCurrentKey()
createPassword
protected byte[] createPassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
- Specified by:
createPassword in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>
retrievePassword
public byte[] retrievePassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
throws org.apache.hadoop.security.token.SecretManager.InvalidToken
- Specified by:
retrievePassword in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>
- Throws:
org.apache.hadoop.security.token.SecretManager.InvalidToken
retrivePasswordInternal
protected byte[] retrivePasswordInternal(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier,
MasterKeyData masterKey)
createIdentifier
public org.apache.hadoop.yarn.security.NMTokenIdentifier createIdentifier()
- It is required for RPC
- Specified by:
createIdentifier in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>
createNMToken
public org.apache.hadoop.yarn.api.records.Token createNMToken(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
org.apache.hadoop.yarn.api.records.NodeId nodeId,
String applicationSubmitter)
- Helper function for creating NMTokens.
newInstance
public static org.apache.hadoop.yarn.api.records.Token newInstance(byte[] password,
org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.