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 Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager
org.apache.hadoop.security.token.SecretManager.InvalidToken -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MasterKeyDataprotected final Lockprotected final ReadWriteLockprotected intprotected final Lock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.security.NMTokenIdentifierIt is required for RPCprotected MasterKeyDataorg.apache.hadoop.yarn.api.records.TokencreateNMToken(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) static org.apache.hadoop.yarn.api.records.TokennewInstance(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, update, validateSecretKeyLength
-
Field Details
-
serialNo
protected int serialNo -
readWriteLock
-
readLock
-
writeLock
-
currentMasterKey
-
-
Constructor Details
-
BaseNMTokenSecretManager
public BaseNMTokenSecretManager()
-
-
Method Details
-
createNewMasterKey
-
getCurrentKey
-
createPassword
protected byte[] createPassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier) - Specified by:
createPasswordin classorg.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:
retrievePasswordin classorg.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:
createIdentifierin classorg.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.- Parameters:
applicationAttemptId- application AttemptId.nodeId- node Id.applicationSubmitter- application Submitter.- Returns:
- NMToken.
-
newInstance
public static org.apache.hadoop.yarn.api.records.Token newInstance(byte[] password, org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
-