public interface PartitionOwner
extends org.apache.hadoop.io.Writable
| Modifier and Type | Method and Description |
|---|---|
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 |
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 |
setPreviousWorkerInfo(WorkerInfo workerInfo)
Set the previous worker info.
|
void |
setWorkerInfo(WorkerInfo workerInfo)
Set the current worker info.
|
void |
writeWithWorkerIds(DataOutput output)
Write to the output, but don't serialize the whole WorkerInfo,
instead use just the task id
|
int getPartitionId()
Partition objectWorkerInfo getWorkerInfo()
void setWorkerInfo(WorkerInfo workerInfo)
workerInfo - Worker info responsible for partitionWorkerInfo getPreviousWorkerInfo()
void setPreviousWorkerInfo(WorkerInfo workerInfo)
workerInfo - Worker info that was previously responsible for the
partition.void writeWithWorkerIds(DataOutput output) throws IOException
output - Output to write toIOExceptionvoid readFieldsWithWorkerIds(DataInput input, Map<Integer,WorkerInfo> workerInfoMap) throws IOException
input - Input to read fromworkerInfoMap - Map from task id to WorkerInfoIOExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.