org.apache.hadoop.yarn.server.resourcemanager.security
Class NMTokenSecretManagerInRM

java.lang.Object
  extended by org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>
      extended by org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager
          extended by org.apache.hadoop.yarn.server.resourcemanager.security.NMTokenSecretManagerInRM

public class NMTokenSecretManagerInRM
extends org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager
org.apache.hadoop.security.token.SecretManager.InvalidToken
 
Field Summary
 
Fields inherited from class org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager
currentMasterKey, readLock, readWriteLock, writeLock
 
Constructor Summary
NMTokenSecretManagerInRM(org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
 void activateNextMasterKey()
          Activate the new master-key
 List<org.apache.hadoop.yarn.api.records.NMToken> createAndGetNMTokens(String applicationSubmitter, org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, List<org.apache.hadoop.yarn.api.records.Container> containers)
           
 org.apache.hadoop.yarn.server.api.records.MasterKey getNextKey()
           
 boolean isApplicationAttemptNMTokenPresent(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, org.apache.hadoop.yarn.api.records.NodeId nodeId)
           
 boolean isApplicationAttemptRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
           
 void registerApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
           
 void removeNodeKey(org.apache.hadoop.yarn.api.records.NodeId nodeId)
          This is to be called when NodeManager reconnects or goes down.
 void rollMasterKey()
          Creates a new master-key and sets it as the primary.
 void start()
           
 void stop()
           
 void unregisterApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
           
 
Methods inherited from class org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager
createIdentifier, createNewMasterKey, createNMToken, createPassword, getCurrentKey, newInstance, retrievePassword, retrivePasswordInternal
 
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
 

Constructor Detail

NMTokenSecretManagerInRM

public NMTokenSecretManagerInRM(org.apache.hadoop.conf.Configuration conf)
Method Detail

rollMasterKey

@InterfaceAudience.Private
public void rollMasterKey()
Creates a new master-key and sets it as the primary.


getNextKey

@InterfaceAudience.Private
public org.apache.hadoop.yarn.server.api.records.MasterKey getNextKey()

activateNextMasterKey

@InterfaceAudience.Private
public void activateNextMasterKey()
Activate the new master-key


start

public void start()

stop

public void stop()

createAndGetNMTokens

public List<org.apache.hadoop.yarn.api.records.NMToken> createAndGetNMTokens(String applicationSubmitter,
                                                                             org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                                                             List<org.apache.hadoop.yarn.api.records.Container> containers)

registerApplicationAttempt

public void registerApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)

isApplicationAttemptRegistered

@InterfaceAudience.Private
public boolean isApplicationAttemptRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)

isApplicationAttemptNMTokenPresent

@InterfaceAudience.Private
public boolean isApplicationAttemptNMTokenPresent(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                                                            org.apache.hadoop.yarn.api.records.NodeId nodeId)

unregisterApplicationAttempt

public void unregisterApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)

removeNodeKey

public void removeNodeKey(org.apache.hadoop.yarn.api.records.NodeId nodeId)
This is to be called when NodeManager reconnects or goes down. This will remove if NMTokens if present for any running application from cache.

Parameters:
nodeId -


Copyright © 2014 Apache Software Foundation. All Rights Reserved.