@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ID extends Object implements WritableComparable<ID>
JobID
,
TaskID
and TaskAttemptID
.JobID
,
TaskID
,
TaskAttemptID
Modifier and Type | Field and Description |
---|---|
protected int |
id |
protected static char |
SEPARATOR |
Modifier | Constructor and Description |
---|---|
protected |
ID() |
|
ID(int id)
constructs an ID object from the given int
|
Modifier and Type | Method and Description |
---|---|
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)
Deserialize the fields of this object from
in . |
String |
toString() |
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
protected static final char SEPARATOR
protected int id
public ID(int id)
protected ID()
public int getId()
public int compareTo(ID that)
compareTo
in interface Comparable<ID>
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.IOException
- any other problem for readFields.public void write(DataOutput out) throws IOException
Writable
out
.write
in interface Writable
out
- DataOuput
to serialize this object into.IOException
- any other problem for write.Copyright © 2023 Apache Software Foundation. All rights reserved.