JobTokenIdentifier (Hadoop 0.20.2-CDH3B4 API)
Date: 2011-02-21

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapreduce.security.token
Class JobTokenIdentifier

    java.lang.Object
      org.apache.hadoop.security.token.TokenIdentifier
          org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier

All Implemented Interfaces:
  Writable

    public class JobTokenIdentifier

extends TokenIdentifier

The token identifier for job token

Constructor Summary
`JobTokenIdentifier()` Default constructor
`JobTokenIdentifier(Text jobid)` Create a job token identifier from a jobid

Method Summary
`Text` | `getJobId()` Get the jobid
`Text` | `getKind()` Get the token kind
`UserGroupInformation` | `getUser()` Get the Ugi with the username encoded in the token identifier
`void` | `readFields(DataInput in)` Deserialize the fields of this object from `in`.
`void` | `write(DataOutput out)` Serialize the fields of this object to `out`.

Methods inherited from class org.apache.hadoop.security.token.TokenIdentifier
`getBytes`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JobTokenIdentifier

    public JobTokenIdentifier()

  Default constructor

### JobTokenIdentifier

    public JobTokenIdentifier(Text jobid)

  Create a job token identifier from a jobid

  Parameters:
    `jobid` - the jobid to use

Method Detail

### getKind

    public Text getKind()

  Get the token kind

  Specified by:
    `getKind` in class `TokenIdentifier`
  Returns:
    the kind of the token

### getUser

    public UserGroupInformation getUser()

  Get the Ugi with the username encoded in the token identifier

  Specified by:
    `getUser` in class `TokenIdentifier`
  Returns:
    the username. null is returned if username in the identifier is empty or null.

### getJobId

    public Text getJobId()

  Get the jobid

  Returns:
    the jobid

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Deserialize the fields of this object from `in`.

  For efficiency, implementations should attempt to re-use storage in the existing object where possible.

  Parameters:
    `in` - `DataInput` to deseriablize this object from.
  Throws:
    `IOException`

### write

    public void write(DataOutput out)
               throws IOException

  Serialize the fields of this object to `out`.

  Parameters:
    `out` - `DataOuput` to serialize this object into.
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation