org.apache.tez.dag.records
Class TezDAGID

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

public class TezDAGID
extends TezID

TezDAGID represents the immutable and unique identifier for a Tez DAG. TezDAGID consists of 2 parts. The first part is the ApplicationId, that is the YARN Application ID that this DAG belongs to. The second part is the DAG number.

See Also:
ApplicationId

Field Summary
static String DAG
           
 
Fields inherited from class org.apache.tez.dag.records.TezID
id, SEPARATOR
 
Constructor Summary
TezDAGID()
           
 
Method Summary
protected  StringBuilder appendTo(StringBuilder builder)
          Add the unique string to the given builder.
 int compareTo(TezID o)
          Compare TaskInProgressIds by first jobIds, then by tip numbers and type.
 boolean equals(Object o)
           
static TezDAGID fromString(String dagId)
           
 org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
          Returns the ApplicationId object that this dag belongs to
static TezDAGID getInstance(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, int id)
          Get a DAGID object from given ApplicationId.
static TezDAGID getInstance(String yarnRMIdentifier, int appId, int id)
          Get a DAGID object from given parts.
 int hashCode()
           
 void readFields(DataInput in)
           
static TezDAGID readTezDAGID(DataInput in)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.tez.dag.records.TezID
getId, readID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DAG

public static final String DAG
See Also:
Constant Field Values
Constructor Detail

TezDAGID

public TezDAGID()
Method Detail

getInstance

public static TezDAGID getInstance(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                                   int id)
Get a DAGID object from given ApplicationId.

Parameters:
applicationId - Application that this dag belongs to
id - the dag number

getInstance

public static TezDAGID getInstance(String yarnRMIdentifier,
                                   int appId,
                                   int id)
Get a DAGID object from given parts.

Parameters:
yarnRMIdentifier - YARN RM identifier
appId - application number
id - the dag number

getApplicationId

public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
Returns the ApplicationId object that this dag belongs to


equals

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

compareTo

public int compareTo(TezID o)
Compare TaskInProgressIds by first jobIds, then by tip numbers and type.

Specified by:
compareTo in interface Comparable<TezID>
Overrides:
compareTo in class TezID

readFields

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

readTezDAGID

public static TezDAGID readTezDAGID(DataInput in)
                             throws IOException
Throws:
IOException

write

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

toString

public String toString()
Overrides:
toString in class TezID

fromString

public static TezDAGID fromString(String dagId)

appendTo

protected StringBuilder appendTo(StringBuilder builder)
Add the unique string to the given builder.

Parameters:
builder - the builder to append to
Returns:
the builder that was passed in

hashCode

public int hashCode()
Overrides:
hashCode in class TezID


Copyright © 2014 Apache Software Foundation. All rights reserved.