org.apache.tez.dag.records
Class TezID

java.lang.Object
  extended by org.apache.tez.dag.records.TezID
All Implemented Interfaces:
Comparable<TezID>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<TezID>
Direct Known Subclasses:
TezDAGID, TezTaskAttemptID, TezTaskID, TezVertexID

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

A general identifier, which internally stores the id as an integer. This is the super class of TezDAGID, TezVertexID, TezTaskID, and TezTaskAttemptID.

See Also:
TezTaskID, TezTaskAttemptID

Field Summary
protected  int id
           
static char SEPARATOR
           
 
Constructor Summary
protected TezID()
           
  TezID(int id)
          constructs an ID object from the given int
 
Method Summary
 int compareTo(TezID 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)
           
static int readID(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

public static final char SEPARATOR
See Also:
Constant Field Values

id

protected int id
Constructor Detail

TezID

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


TezID

protected TezID()
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(TezID that)
Compare IDs by associated numbers

Specified by:
compareTo in interface Comparable<TezID>

readFields

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

readID

public static int readID(DataInput in)
                  throws IOException
Throws:
IOException

write

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


Copyright © 2014 Apache Software Foundation. All rights reserved.