org.apache.giraph.examples
Class SimpleCheckpointVertex

java.lang.Object
  extended by org.apache.giraph.examples.SimpleCheckpointVertex
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class SimpleCheckpointVertex
extends Object
implements org.apache.hadoop.util.Tool

An example that simply uses its id, value, and edges to compute new data every iteration to verify that checkpoint restarting works. Fault injection can also test automated checkpoint restarts.


Nested Class Summary
static class SimpleCheckpointVertex.SimpleCheckpointComputation
          Actual computation.
static class SimpleCheckpointVertex.SimpleCheckpointVertexMasterCompute
          Master compute associated with SimpleCheckpointVertex.
static class SimpleCheckpointVertex.SimpleCheckpointVertexWorkerContext
          Worker context associated with SimpleCheckpointVertex.
 
Field Summary
static String ENABLE_FAULT
          Should fault?
static int FAULTING_SUPERSTEP
          Which superstep to cause the worker to fail
static long FAULTING_VERTEX_ID
          Vertex id to fault on
static String SUPERSTEP_COUNT
          Dynamically set number of supersteps
 
Constructor Summary
SimpleCheckpointVertex()
           
 
Method Summary
 org.apache.hadoop.conf.Configuration getConf()
           
static void main(String[] args)
          Executable from the command line.
 int run(String[] args)
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAULTING_SUPERSTEP

public static final int FAULTING_SUPERSTEP
Which superstep to cause the worker to fail

See Also:
Constant Field Values

FAULTING_VERTEX_ID

public static final long FAULTING_VERTEX_ID
Vertex id to fault on

See Also:
Constant Field Values

SUPERSTEP_COUNT

public static final String SUPERSTEP_COUNT
Dynamically set number of supersteps

See Also:
Constant Field Values

ENABLE_FAULT

public static final String ENABLE_FAULT
Should fault?

See Also:
Constant Field Values
Constructor Detail

SimpleCheckpointVertex

public SimpleCheckpointVertex()
Method Detail

run

public int run(String[] args)
        throws Exception
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Executable from the command line.

Parameters:
args - Command line args.
Throws:
Exception

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable


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