public final class SparkGraphComputer extends AbstractHadoopGraphComputer
AbstractHadoopGraphComputer.Features
GraphComputer.Exceptions, GraphComputer.Persist, GraphComputer.ResultGraph
executed, graphFilter, hadoopGraph, logger, mapReducers, persist, resultGraph, vertexProgram, workers
Constructor and Description |
---|
SparkGraphComputer(HadoopGraph hadoopGraph) |
Modifier and Type | Method and Description |
---|---|
GraphComputer |
configure(String key,
Object value)
Set an arbitrary configuration key/value for the underlying
org.apache.commons.configuration.Configuration in the GraphComputer . |
protected void |
loadJar(Configuration hadoopConfiguration,
File file,
Object... params) |
static void |
main(String[] args) |
Future<ComputerResult> |
submit()
|
GraphComputer |
workers(int workers)
Set the desired number of workers to execute the
VertexProgram and MapReduce jobs. |
copyDirectoryIfNonExistent, edges, features, loadJars, mapReduce, persist, program, result, toString, validateStatePriorToExecution, vertices
public SparkGraphComputer(HadoopGraph hadoopGraph)
public GraphComputer workers(int workers)
GraphComputer
VertexProgram
and MapReduce
jobs.
This is a recommendation to the underlying GraphComputer
implementation and is allowed to deviate accordingly by the implementation.workers
in interface GraphComputer
workers
in class AbstractHadoopGraphComputer
workers
- the number of workers to execute the submissionpublic GraphComputer configure(String key, Object value)
GraphComputer
org.apache.commons.configuration.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 configurationpublic Future<ComputerResult> submit()
GraphComputer
Future
denoting a reference to the asynchronous computation and where to get the DefaultComputerResult
when its is complete.protected void loadJar(Configuration hadoopConfiguration, File file, Object... params)
loadJar
in class AbstractHadoopGraphComputer
Copyright © 2013–2017 Apache Software Foundation. All rights reserved.