org.apache.hadoop.mapreduce
Class ID

java.lang.Object
  extended by org.apache.hadoop.mapreduce.ID
All Implemented Interfaces:
Comparable<ID>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<ID>
Direct Known Subclasses:
ID

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class ID
extends Object
implements org.apache.hadoop.io.WritableComparable<ID>

A general identifier, which internally stores the id as an integer. This is the super class of JobID, TaskID and TaskAttemptID.

See Also:
JobID, TaskID, TaskAttemptID

Field Summary
protected  int id
           
protected static char SEPARATOR
           
 
Constructor Summary
protected ID()
           
  ID(int id)
          constructs an ID object from the given int
 
Method Summary
 int compareTo(ID that)
          Compare IDs by associated numbers
 boolean equals(Object o)
           
 int getId()
          returns the int which represents the identifier
 int hashCode()
           
 void readFields(DataInput in)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

protected static final char SEPARATOR
See Also:
Constant Field Values

id

protected int id
Constructor Detail

ID

public ID(int id)
constructs an ID object from the given int


ID

protected ID()
Method Detail

getId

public int getId()
returns the int which represents the identifier


toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

compareTo

public int compareTo(ID that)
Compare IDs by associated numbers

Specified by:
compareTo in interface Comparable<ID>

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.