I
- Vertex idV
- Vertex valueE
- Edge valuepublic interface CentralizedServiceMaster<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends CentralizedService<I,V,E>
Modifier and Type | Method and Description |
---|---|
void |
addGiraphTimersAndSendCounters(long superstep)
Add the Giraph Timers to thirft counter struct, and send to the job client
Counters include the Giraph Timers for setup, initialise, shutdown, total,
and time for the given superstep
|
boolean |
becomeMaster()
Become the master.
|
List<WorkerInfo> |
checkWorkers()
Check all the
WorkerInfo objects to ensure
that a minimum number of good workers exists out of the total that have
reported. |
void |
cleanup(SuperstepState superstepState)
Clean up the service (no calls may be issued after this)
|
SuperstepState |
coordinateSuperstep()
Master coordinates the superstep
|
int |
createEdgeInputSplits()
Create the
BspInputSplit objects from the index range based on the
user-defined EdgeInputFormat. |
int |
createMappingInputSplits()
Create the
BspInputSplit objects from the index range based on the
user-defined MappingInputFormat. |
int |
createVertexInputSplits()
Create the
BspInputSplit 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.
|
AggregatorToGlobalCommTranslation |
getAggregatorTranslationHandler()
Handler for aggregators to reduce/broadcast translation
|
MasterGlobalCommHandler |
getGlobalCommHandler()
Get handler for global communication
|
long |
getLastGoodCheckpoint()
Get the last known good checkpoint
|
MasterCompute |
getMasterCompute()
Get MasterCompute object
|
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)
|
getConfiguration, getJobProgressTracker, getMasterInfo, getRestartedSuperstep, getSuperstep, getWorkerInfoList
void setup()
boolean becomeMaster()
List<WorkerInfo> checkWorkers()
WorkerInfo
objects to ensure
that a minimum number of good workers exists out of the total that have
reported.int createMappingInputSplits()
BspInputSplit
objects from the index range based on the
user-defined MappingInputFormat. The BspInputSplit
objects will
processed by the workers later on during the INPUT_SUPERSTEP.int createVertexInputSplits()
BspInputSplit
objects from the index range based on the
user-defined VertexInputFormat. The BspInputSplit
objects will
processed by the workers later on during the INPUT_SUPERSTEP.int createEdgeInputSplits()
BspInputSplit
objects from the index range based on the
user-defined EdgeInputFormat. The BspInputSplit
objects will
processed by the workers later on during the INPUT_SUPERSTEP.SuperstepState coordinateSuperstep() throws org.apache.zookeeper.KeeperException, InterruptedException
InterruptedException
org.apache.zookeeper.KeeperException
void restartFromCheckpoint(long checkpoint)
checkpoint
- Checkpoint to restart fromlong 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)MasterGlobalCommHandler getGlobalCommHandler()
AggregatorToGlobalCommTranslation getAggregatorTranslationHandler()
MasterCompute getMasterCompute()
void postSuperstep()
void postApplication()
void failureCleanup(Exception e)
e
- Exception job failed from. May be null.void cleanup(SuperstepState superstepState) throws IOException, InterruptedException
superstepState
- what was the state
of the last complete superstep?IOException
InterruptedException
void addGiraphTimersAndSendCounters(long superstep)
superstep
- superstep for which the GiraphTimer will be sentCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.