|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
I - Vertex idV - Vertex valueE - Edge valueM - Message datapublic interface CentralizedServiceWorker<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>
All workers should have access to this centralized service to execute the following methods.
| Method Summary | |
|---|---|
void |
cleanup(FinishedSuperstepStats finishedSuperstepStats)
Clean up the service (no calls may be issued after this) |
void |
exchangeVertexPartitions(Collection<? extends PartitionOwner> masterSetPartitionOwners)
If desired by the user, vertex partitions are redistributed among workers according to the chosen WorkerGraphPartitioner. |
void |
failureCleanup()
Operations that will be called if there is a failure by a worker. |
FinishedSuperstepStats |
finishSuperstep(GraphState<I,V,E,M> graphState,
List<PartitionStats> partitionStatsList)
Worker is done with its portion of the superstep. |
WorkerAggregatorHandler |
getAggregatorHandler()
Get worker aggregator handler |
GraphTaskManager<I,V,E,M> |
getGraphTaskManager()
Get the GraphTaskManager that this service is using. |
MasterInfo |
getMasterInfo()
Get master info |
Integer |
getPartitionId(I vertexId)
Get the partition id that a vertex id would belong to. |
Iterable<? extends PartitionOwner> |
getPartitionOwners()
Get all partition owners. |
PartitionStore<I,V,E,M> |
getPartitionStore()
Get the partition store for this worker. |
ServerData<I,V,E,M> |
getServerData()
Get server data |
SuperstepOutput<I,V,E> |
getSuperstepOutput()
Get the superstep output class |
PartitionOwner |
getVertexPartitionOwner(I vertexId)
Every client will need to get a partition owner from a vertex id so that they know which worker to sent the request to. |
WorkerClient<I,V,E,M> |
getWorkerClient()
Get the worker client (for instantiating WorkerClientRequestProcessor instances. |
WorkerContext |
getWorkerContext()
Get the worker context. |
WorkerInfo |
getWorkerInfo()
Get the worker information |
WorkerObserver[] |
getWorkerObservers()
Get the observers for this Worker. |
boolean |
hasPartition(Integer partitionId)
Whether a partition with given id exists on this worker. |
VertexEdgeCount |
loadCheckpoint(long superstep)
Load the vertices, edges, messages from the beginning of a superstep. |
void |
prepareSuperstep()
Final preparation for superstep, called after startSuperstep and potential loading from checkpoint, right before the computation started TODO how to avoid this additional function |
FinishedSuperstepStats |
setup()
Setup (must be called prior to any other function) |
Collection<? extends PartitionOwner> |
startSuperstep(GraphState<I,V,E,M> graphState)
Take all steps prior to actually beginning the computation of a superstep. |
void |
storeCheckpoint()
Both the vertices and the messages need to be checkpointed in order for them to be used. |
| Methods inherited from interface org.apache.giraph.bsp.CentralizedService |
|---|
checkpointFrequencyMet, getRestartedSuperstep, getSuperstep, getWorkerInfoList |
| Method Detail |
|---|
FinishedSuperstepStats setup()
WorkerInfo getWorkerInfo()
WorkerClient<I,V,E,M> getWorkerClient()
WorkerContext getWorkerContext()
WorkerObserver[] getWorkerObservers()
PartitionStore<I,V,E,M> getPartitionStore()
void storeCheckpoint()
throws IOException
IOException
VertexEdgeCount loadCheckpoint(long superstep)
throws IOException
superstep - which checkpoint to use
IOExceptionCollection<? extends PartitionOwner> startSuperstep(GraphState<I,V,E,M> graphState)
graphState - Current graph state
FinishedSuperstepStats finishSuperstep(GraphState<I,V,E,M> graphState,
List<PartitionStats> partitionStatsList)
graphState - Current graph statepartitionStatsList - All the partition stats for this worker
Integer getPartitionId(I vertexId)
vertexId - Vertex id
boolean hasPartition(Integer partitionId)
partitionId - Partition id
PartitionOwner getVertexPartitionOwner(I vertexId)
vertexId - Vertex index to look for
Iterable<? extends PartitionOwner> getPartitionOwners()
void exchangeVertexPartitions(Collection<? extends PartitionOwner> masterSetPartitionOwners)
masterSetPartitionOwners - Partition owner info passed from the
master.MasterInfo getMasterInfo()
GraphTaskManager<I,V,E,M> getGraphTaskManager()
void failureCleanup()
ServerData<I,V,E,M> getServerData()
WorkerAggregatorHandler getAggregatorHandler()
void prepareSuperstep()
SuperstepOutput<I,V,E> getSuperstepOutput()
void cleanup(FinishedSuperstepStats finishedSuperstepStats)
throws IOException,
InterruptedException
finishedSuperstepStats - Finished supestep stats
IOException
InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||