org.apache.giraph.bsp
Interface CentralizedService<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>

Type Parameters:
I - Vertex id
V - Vertex value
E - Edge value
All Known Subinterfaces:
CentralizedServiceMaster<I,V,E>, CentralizedServiceWorker<I,V,E>
All Known Implementing Classes:
BspService, BspServiceMaster, BspServiceWorker

public interface CentralizedService<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>

Basic service interface shared by both CentralizedServiceMaster and CentralizedServiceWorker.


Method Summary
 boolean checkpointFrequencyMet(long superstep)
          Given a superstep, should it be checkpointed based on the checkpoint frequency?
 long getRestartedSuperstep()
          Get the restarted superstep
 long getSuperstep()
          Get the current global superstep of the application to work on.
 List<WorkerInfo> getWorkerInfoList()
          Get list of workers
 

Method Detail

getSuperstep

long getSuperstep()
Get the current global superstep of the application to work on.

Returns:
global superstep (begins at INPUT_SUPERSTEP)

getRestartedSuperstep

long getRestartedSuperstep()
Get the restarted superstep

Returns:
-1 if not manually restarted, otherwise the superstep id

checkpointFrequencyMet

boolean checkpointFrequencyMet(long superstep)
Given a superstep, should it be checkpointed based on the checkpoint frequency?

Parameters:
superstep - superstep to check against frequency
Returns:
true if checkpoint frequency met or superstep is 1.

getWorkerInfoList

List<WorkerInfo> getWorkerInfoList()
Get list of workers

Returns:
List of workers


Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.