public final class GiraphGraphComputer extends AbstractHadoopGraphComputer implements GraphComputer
Modifier and Type | Class and Description |
---|---|
class |
GiraphGraphComputer.Features |
GraphComputer.Exceptions, GraphComputer.Persist, GraphComputer.ResultGraph
Modifier and Type | Field and Description |
---|---|
protected GiraphConfiguration |
giraphConfiguration |
executed, graphFilter, hadoopGraph, logger, mapReducers, persist, resultGraph, vertexProgram, workers
Constructor and Description |
---|
GiraphGraphComputer(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 . |
GiraphGraphComputer.Features |
features() |
org.apache.hadoop.conf.Configuration |
getConf() |
protected void |
loadJar(org.apache.hadoop.conf.Configuration hadoopConfiguration,
File file,
Object... params) |
static void |
main(String[] args) |
GraphComputer |
program(VertexProgram vertexProgram)
Set the
VertexProgram to be executed by the GraphComputer . |
int |
run(String[] args) |
void |
setConf(org.apache.hadoop.conf.Configuration configuration) |
Future<ComputerResult> |
submit()
|
GraphComputer |
workers(int workers)
Set the desired number of workers to execute the
VertexProgram and MapReduce jobs. |
copyDirectoryIfNonExistent, edges, loadJars, mapReduce, persist, result, toString, validateStatePriorToExecution, vertices
public GiraphGraphComputer(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.configure
in interface GraphComputer
key
- the key of the configurationvalue
- the value of the configurationpublic GraphComputer program(VertexProgram vertexProgram)
GraphComputer
VertexProgram
to be executed by the GraphComputer
.
There can only be one VertexProgram for the GraphComputer.program
in interface GraphComputer
program
in class AbstractHadoopGraphComputer
vertexProgram
- the VertexProgram to be executedpublic Future<ComputerResult> submit()
GraphComputer
submit
in interface GraphComputer
Future
denoting a reference to the asynchronous computation and where to get the DefaultComputerResult
when its is complete.public int run(String[] args)
public void setConf(org.apache.hadoop.conf.Configuration configuration)
public org.apache.hadoop.conf.Configuration getConf()
protected void loadJar(org.apache.hadoop.conf.Configuration hadoopConfiguration, File file, Object... params) throws IOException
loadJar
in class AbstractHadoopGraphComputer
IOException
public GiraphGraphComputer.Features features()
features
in interface GraphComputer
features
in class AbstractHadoopGraphComputer
Copyright © 2013–2018 Apache Software Foundation. All rights reserved.