public class BasicPartitionOwner extends Object implements PartitionOwner, ImmutableClassesGiraphConfigurable
| Constructor and Description |
|---|
BasicPartitionOwner()
Default constructor.
|
BasicPartitionOwner(int partitionId,
WorkerInfo workerInfo)
Constructor with partition id and worker info.
|
BasicPartitionOwner(int partitionId,
WorkerInfo workerInfo,
WorkerInfo previousWorkerInfo,
String checkpointFilesPrefix)
Constructor with partition id and worker info.
|
| Modifier and Type | Method and Description |
|---|---|
ImmutableClassesGiraphConfiguration |
getConf()
Return the configuration used by this object.
|
int |
getPartitionId()
Get the partition id that maps to the relevant
Partition object |
WorkerInfo |
getPreviousWorkerInfo()
Get the worker information that was previously responsible for the
partition id.
|
WorkerInfo |
getWorkerInfo()
Get the worker information that is currently responsible for
the partition id.
|
void |
readFields(DataInput input) |
void |
readFieldsWithWorkerIds(DataInput input,
Map<Integer,WorkerInfo> workerInfoMap)
A match for writeWithWorkerIds method - for WorkerInfos it will read
just task ids from input and then find the matching WorkerInfo in the
provided map and set it
|
void |
setConf(ImmutableClassesGiraphConfiguration conf)
Set the configuration to be used by this object.
|
void |
setPreviousWorkerInfo(WorkerInfo workerInfo)
Set the previous worker info.
|
void |
setWorkerInfo(WorkerInfo workerInfo)
Set the current worker info.
|
String |
toString() |
void |
write(DataOutput output) |
void |
writeWithWorkerIds(DataOutput output)
Write to the output, but don't serialize the whole WorkerInfo,
instead use just the task id
|
public BasicPartitionOwner()
public BasicPartitionOwner(int partitionId,
WorkerInfo workerInfo)
partitionId - Partition id of this partition.workerInfo - Owner of the partition.public BasicPartitionOwner(int partitionId,
WorkerInfo workerInfo,
WorkerInfo previousWorkerInfo,
String checkpointFilesPrefix)
partitionId - Partition id of this partition.workerInfo - Owner of the partition.previousWorkerInfo - Previous owner of this partition.checkpointFilesPrefix - Prefix of the checkpoint files.public int getPartitionId()
PartitionOwnerPartition objectgetPartitionId in interface PartitionOwnerpublic WorkerInfo getWorkerInfo()
PartitionOwnergetWorkerInfo in interface PartitionOwnerpublic void setWorkerInfo(WorkerInfo workerInfo)
PartitionOwnersetWorkerInfo in interface PartitionOwnerworkerInfo - Worker info responsible for partitionpublic WorkerInfo getPreviousWorkerInfo()
PartitionOwnergetPreviousWorkerInfo in interface PartitionOwnerpublic void setPreviousWorkerInfo(WorkerInfo workerInfo)
PartitionOwnersetPreviousWorkerInfo in interface PartitionOwnerworkerInfo - Worker info that was previously responsible for the
partition.public void writeWithWorkerIds(DataOutput output) throws IOException
PartitionOwnerwriteWithWorkerIds in interface PartitionOwneroutput - Output to write toIOExceptionpublic void readFieldsWithWorkerIds(DataInput input, Map<Integer,WorkerInfo> workerInfoMap) throws IOException
PartitionOwnerreadFieldsWithWorkerIds in interface PartitionOwnerinput - Input to read fromworkerInfoMap - Map from task id to WorkerInfoIOExceptionpublic void readFields(DataInput input) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput output) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic ImmutableClassesGiraphConfiguration getConf()
ImmutableClassesGiraphConfigurablegetConf in interface ImmutableClassesGiraphConfigurablepublic void setConf(ImmutableClassesGiraphConfiguration conf)
GiraphConfigurationSettablesetConf in interface GiraphConfigurationSettableconf - Set configurationCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.