org.apache.hadoop.yarn.security
Class ContainerTokenIdentifier

java.lang.Object
  extended by org.apache.hadoop.security.token.TokenIdentifier
      extended by org.apache.hadoop.yarn.security.ContainerTokenIdentifier
All Implemented Interfaces:
org.apache.hadoop.io.Writable

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class ContainerTokenIdentifier
extends org.apache.hadoop.security.token.TokenIdentifier

TokenIdentifier for a container. Encodes ContainerId, Resource needed by the container and the target NMs host-address.


Nested Class Summary
static class ContainerTokenIdentifier.Renewer
           
 
Field Summary
static org.apache.hadoop.io.Text KIND
           
 
Constructor Summary
ContainerTokenIdentifier()
          Default constructor needed by RPC layer/SecretManager.
ContainerTokenIdentifier(org.apache.hadoop.yarn.api.records.ContainerId containerID, String hostName, String appSubmitter, org.apache.hadoop.yarn.api.records.Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier)
           
 
Method Summary
 String getApplicationSubmitter()
           
 org.apache.hadoop.yarn.api.records.ContainerId getContainerID()
           
 long getExpiryTimeStamp()
           
 org.apache.hadoop.io.Text getKind()
           
 int getMasterKeyId()
           
 String getNmHostAddress()
           
 org.apache.hadoop.yarn.api.records.Resource getResource()
           
 long getRMIdentifer()
          Get the RMIdentifier of RM in which containers are allocated
 org.apache.hadoop.security.UserGroupInformation getUser()
           
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.security.token.TokenIdentifier
getBytes, getTrackingId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KIND

public static final org.apache.hadoop.io.Text KIND
Constructor Detail

ContainerTokenIdentifier

public ContainerTokenIdentifier(org.apache.hadoop.yarn.api.records.ContainerId containerID,
                                String hostName,
                                String appSubmitter,
                                org.apache.hadoop.yarn.api.records.Resource r,
                                long expiryTimeStamp,
                                int masterKeyId,
                                long rmIdentifier)

ContainerTokenIdentifier

public ContainerTokenIdentifier()
Default constructor needed by RPC layer/SecretManager.

Method Detail

getContainerID

public org.apache.hadoop.yarn.api.records.ContainerId getContainerID()

getApplicationSubmitter

public String getApplicationSubmitter()

getNmHostAddress

public String getNmHostAddress()

getResource

public org.apache.hadoop.yarn.api.records.Resource getResource()

getExpiryTimeStamp

public long getExpiryTimeStamp()

getMasterKeyId

public int getMasterKeyId()

getRMIdentifer

public long getRMIdentifer()
Get the RMIdentifier of RM in which containers are allocated

Returns:
RMIdentifier

write

public void write(DataOutput out)
           throws IOException
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Throws:
IOException

getKind

public org.apache.hadoop.io.Text getKind()
Specified by:
getKind in class org.apache.hadoop.security.token.TokenIdentifier

getUser

public org.apache.hadoop.security.UserGroupInformation getUser()
Specified by:
getUser in class org.apache.hadoop.security.token.TokenIdentifier


Copyright © 2014 Apache Software Foundation. All Rights Reserved.