public interface GraphComputer
GraphComputer
is responsible for the execution of a VertexProgram
and then a set of MapReduce
jobs
over the vertices in the Graph
. It is up to the GraphComputer
implementation to determine the
appropriate memory structures given the computing substrate.Modifier and Type | Interface and Description |
---|---|
static class |
GraphComputer.Exceptions |
static interface |
GraphComputer.Features |
static class |
GraphComputer.Persist |
static class |
GraphComputer.ResultGraph |
Modifier and Type | Method and Description |
---|---|
default GraphComputer |
configure(String key,
Object value)
Set an arbitrary configuration key/value for the underlying
Configuration in the GraphComputer . |
default GraphComputer.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. |
Future<ComputerResult> |
submit()
|
GraphComputer |
workers(int workers)
Set the desired number of workers to execute the
VertexProgram and MapReduce jobs. |
GraphComputer result(GraphComputer.ResultGraph resultGraph)
GraphComputer.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
.resultGraph
- the type of graph to be returned by ComputerResult.graph()
GraphComputer persist(GraphComputer.Persist persist)
GraphComputer.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
- the persistence level of the resultant computationGraphComputer program(VertexProgram vertexProgram)
VertexProgram
to be executed by the GraphComputer
.
There can only be one VertexProgram for the GraphComputer.vertexProgram
- the VertexProgram to be executedGraphComputer mapReduce(MapReduce mapReduce)
MapReduce
job to the set of MapReduce jobs to be executed by the GraphComputer
.
There can be any number of MapReduce jobs.mapReduce
- the MapReduce job to add to the computationGraphComputer workers(int workers)
VertexProgram
and MapReduce
jobs.
This is a recommendation to the underlying GraphComputer
implementation and is allowed to deviate accordingly by the implementation.workers
- the number of workers to execute the submissiondefault GraphComputer configure(String key, Object value)
Configuration
in the GraphComputer
.
Typically, the other fluent methods in GraphComputer
should be used to configure the computation.
However, for some custom configuration in the underlying engine, this method should be used.
Different GraphComputer implementations will have different key/values and thus, parameters placed here are generally not universal to all GraphComputer implementations.
The default implementation simply does nothing and returns the GraphComputer
unchanged.key
- the key of the configurationvalue
- the value of the configurationFuture<ComputerResult> submit()
Future
denoting a reference to the asynchronous computation and where to get the DefaultComputerResult
when its is complete.default GraphComputer.Features features()
Copyright © 2013–2017 Apache Software Foundation. All rights reserved.