public class PartitionSet extends Writable
Constructor and Description |
---|
PartitionSet() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the parIDs
|
int |
getNumWriteBytes()
Get the number of bytes of encoded data 4 for
storing worker ID, 4 for storing the size of
parIDs, the rest for storing the parIDs
|
IntArrayList |
getParSet()
Get the partition ID set
|
int |
getWorkerID()
Get the worker ID
|
void |
read(java.io.DataInput in)
Read PartitionSet from DataInput
|
void |
setParSet(IntArrayList partitionSet)
Set the partition ID set
|
void |
setWorkerID(int id)
Set the worker ID
|
void |
write(java.io.DataOutput out)
Write the PartitionSet to DataOutput
|
create, encode, forClass, free, getNumEnocdeBytes, newInstance, release
public void setWorkerID(int id)
id
- woker ID to setpublic int getWorkerID()
public void setParSet(IntArrayList partitionSet)
partitionSet
- partition ID setpublic IntArrayList getParSet()
public int getNumWriteBytes()
getNumWriteBytes
in class Writable
public void write(java.io.DataOutput out) throws java.io.IOException
public void read(java.io.DataInput in) throws java.io.IOException