public abstract class AbstractHadoopGraphComputer extends Object implements GraphComputer
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractHadoopGraphComputer.Features |
GraphComputer.Exceptions, GraphComputer.Persist, GraphComputer.ResultGraph| Modifier and Type | Field and Description |
|---|---|
protected boolean |
executed |
protected HadoopGraph |
hadoopGraph |
protected Logger |
logger |
protected Set<MapReduce> |
mapReducers |
protected GraphComputer.Persist |
persist |
protected GraphComputer.ResultGraph |
resultGraph |
protected VertexProgram<Object> |
vertexProgram |
protected int |
workers |
| Constructor and Description |
|---|
AbstractHadoopGraphComputer(HadoopGraph hadoopGraph) |
| Modifier and Type | Method and Description |
|---|---|
AbstractHadoopGraphComputer.Features |
features() |
GraphComputer |
mapReduce(MapReduce mapReduce)
Add a
MapReduce job to the set of MapReduce jobs to be executed by the GraphComputer. |
GraphComputer |
persist(GraphComputer.Persist persist)
Set the
GraphComputer.Persist level of the computation. |
GraphComputer |
program(VertexProgram vertexProgram)
Set the
VertexProgram to be executed by the GraphComputer. |
GraphComputer |
result(GraphComputer.ResultGraph resultGraph)
Set the
GraphComputer.ResultGraph of the computation. |
String |
toString() |
protected void |
validateStatePriorToExecution() |
GraphComputer |
workers(int workers)
Set the desired number of workers to execute the
VertexProgram and MapReduce jobs. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconfigure, submitprotected final Logger logger
protected final HadoopGraph hadoopGraph
protected boolean executed
protected VertexProgram<Object> vertexProgram
protected int workers
protected GraphComputer.ResultGraph resultGraph
protected GraphComputer.Persist persist
public AbstractHadoopGraphComputer(HadoopGraph hadoopGraph)
public GraphComputer result(GraphComputer.ResultGraph resultGraph)
GraphComputerGraphComputer.ResultGraph of the computation.
If this is not set explicitly by the user, then the VertexProgram can choose the most efficient result for its intended use.
If there is no declared vertex program, then the GraphComputer defaults to GraphComputer.ResultGraph.ORIGINAL.result in interface GraphComputerresultGraph - the type of graph to be returned by ComputerResult.graph()public GraphComputer persist(GraphComputer.Persist persist)
GraphComputerGraphComputer.Persist level of the computation.
If this is not set explicitly by the user, then the VertexProgram can choose the most efficient persist for the its intended use.
If there is no declared vertex program, then the GraphComputer defaults to GraphComputer.Persist.NOTHING.persist in interface GraphComputerpersist - the persistence level of the resultant computationpublic GraphComputer program(VertexProgram vertexProgram)
GraphComputerVertexProgram to be executed by the GraphComputer.
There can only be one VertexProgram for the GraphComputer.program in interface GraphComputervertexProgram - the VertexProgram to be executedpublic GraphComputer mapReduce(MapReduce mapReduce)
GraphComputerMapReduce job to the set of MapReduce jobs to be executed by the GraphComputer.
There can be any number of MapReduce jobs.mapReduce in interface GraphComputermapReduce - the MapReduce job to add to the computationpublic GraphComputer workers(int workers)
GraphComputerVertexProgram and MapReduce jobs.
This is a recommendation to the underlying GraphComputer implementation and is allowed to deviate accordingly by the implementation.workers in interface GraphComputerworkers - the number of workers to execute the submissionprotected void validateStatePriorToExecution()
public AbstractHadoopGraphComputer.Features features()
features in interface GraphComputerCopyright © 2013–2015 Apache Software Foundation. All rights reserved.