public class AMRMTokenSecretManager
extends org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.AMRMTokenIdentifier>
| Constructor | Description |
|---|---|
AMRMTokenSecretManager(org.apache.hadoop.conf.Configuration conf,
RMContext rmContext) |
Create an
AMRMTokenSecretManager. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
activateNextMasterKey() |
|
void |
addPersistedPassword(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> token) |
Populate persisted password of AMRMToken back to AMRMTokenSecretManager.
|
void |
applicationMasterFinished(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) |
|
org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> |
createAndGetAMRMToken(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) |
|
org.apache.hadoop.yarn.security.AMRMTokenIdentifier |
createIdentifier() |
Creates an empty TokenId to be used for de-serializing an
AMRMTokenIdentifier by the RPC layer. |
org.apache.hadoop.yarn.server.security.MasterKeyData |
createNewMasterKey() |
|
protected byte[] |
createPassword(org.apache.hadoop.yarn.security.AMRMTokenIdentifier identifier) |
|
org.apache.hadoop.yarn.server.security.MasterKeyData |
getCurrnetMasterKeyData() |
|
org.apache.hadoop.yarn.server.security.MasterKeyData |
getMasterKey() |
|
org.apache.hadoop.yarn.server.security.MasterKeyData |
getNextMasterKeyData() |
|
void |
recover(RMStateStore.RMState state) |
|
byte[] |
retrievePassword(org.apache.hadoop.yarn.security.AMRMTokenIdentifier identifier) |
Retrieve the password for the given
AMRMTokenIdentifier. |
void |
start() |
|
void |
stop() |
public AMRMTokenSecretManager(org.apache.hadoop.conf.Configuration conf,
RMContext rmContext)
AMRMTokenSecretManager.conf - configuration.rmContext - rm context.public void start()
public void stop()
public void applicationMasterFinished(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
public void activateNextMasterKey()
@Private @VisibleForTesting public org.apache.hadoop.yarn.server.security.MasterKeyData createNewMasterKey()
public org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> createAndGetAMRMToken(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
@VisibleForTesting public org.apache.hadoop.yarn.server.security.MasterKeyData getMasterKey()
public void addPersistedPassword(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> token)
throws java.io.IOException
token - AMRMTokenIdentifier.java.io.IOException - an I/O exception has occurred.public byte[] retrievePassword(org.apache.hadoop.yarn.security.AMRMTokenIdentifier identifier)
throws org.apache.hadoop.security.token.SecretManager.InvalidToken
AMRMTokenIdentifier.
Used by RPC layer to validate a remote AMRMTokenIdentifier.retrievePassword in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.AMRMTokenIdentifier>org.apache.hadoop.security.token.SecretManager.InvalidTokenpublic org.apache.hadoop.yarn.security.AMRMTokenIdentifier createIdentifier()
AMRMTokenIdentifier by the RPC layer.createIdentifier in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.AMRMTokenIdentifier>@Private @VisibleForTesting public org.apache.hadoop.yarn.server.security.MasterKeyData getCurrnetMasterKeyData()
@Private @VisibleForTesting public org.apache.hadoop.yarn.server.security.MasterKeyData getNextMasterKeyData()
@Private protected byte[] createPassword(org.apache.hadoop.yarn.security.AMRMTokenIdentifier identifier)
createPassword in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.AMRMTokenIdentifier>public void recover(RMStateStore.RMState state)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.