|
||||||||||
| 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 CentralizedServiceMaster<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>
At most, there will be one active master at a time, but many threads can be trying to be the active master.
| Method Summary | |
|---|---|
boolean |
becomeMaster()
Become the master. |
void |
cleanup()
Clean up the service (no calls may be issued after this) |
SuperstepState |
coordinateSuperstep()
Master coordinates the superstep |
int |
createEdgeInputSplits()
Create the InputSplit objects from the index range based on the
user-defined EdgeInputFormat. |
int |
createVertexInputSplits()
Create the InputSplit objects from the index range based on the
user-defined VertexInputFormat. |
void |
failureCleanup(Exception e)
Called when the job fails in order to let the Master do any cleanup. |
MasterAggregatorHandler |
getAggregatorHandler()
Get master aggregator handler |
long |
getLastGoodCheckpoint()
Get the last known good checkpoint |
MasterInfo |
getMasterInfo()
Get master information |
void |
postApplication()
Application has finished. |
void |
postSuperstep()
Superstep has finished. |
void |
restartFromCheckpoint(long checkpoint)
Master can decide to restart from the last good checkpoint if a worker fails during a superstep. |
void |
setJobState(ApplicationState state,
long applicationAttempt,
long desiredSuperstep)
If the master decides that this job doesn't have the resources to continue, it can fail the job. |
void |
setup()
Setup (must be called prior to any other function) |
| Methods inherited from interface org.apache.giraph.bsp.CentralizedService |
|---|
checkpointFrequencyMet, getRestartedSuperstep, getSuperstep, getWorkerInfoList |
| Method Detail |
|---|
void setup()
boolean becomeMaster()
MasterInfo getMasterInfo()
int createVertexInputSplits()
InputSplit objects from the index range based on the
user-defined VertexInputFormat. The InputSplit objects will
processed by the workers later on during the INPUT_SUPERSTEP.
int createEdgeInputSplits()
InputSplit objects from the index range based on the
user-defined EdgeInputFormat. The InputSplit objects will
processed by the workers later on during the INPUT_SUPERSTEP.
SuperstepState coordinateSuperstep()
throws org.apache.zookeeper.KeeperException,
InterruptedException
InterruptedException
org.apache.zookeeper.KeeperExceptionvoid restartFromCheckpoint(long checkpoint)
checkpoint - Checkpoint to restart from
long getLastGoodCheckpoint()
throws IOException
IOException
void setJobState(ApplicationState state,
long applicationAttempt,
long desiredSuperstep)
state - State of the application.applicationAttempt - Attempt to start ondesiredSuperstep - Superstep to restart from (if applicable)MasterAggregatorHandler getAggregatorHandler()
void postSuperstep()
void postApplication()
void failureCleanup(Exception e)
e - Exception job failed from. May be null.
void cleanup()
throws IOException,
InterruptedException
IOException
InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||