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, verticespublic GiraphGraphComputer(HadoopGraph hadoopGraph)
public 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 in class AbstractHadoopGraphComputerworkers - the number of workers to execute the submissionpublic GraphComputer configure(String key, Object value)
GraphComputerorg.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 GraphComputerkey - the key of the configurationvalue - the value of the configurationpublic GraphComputer program(VertexProgram vertexProgram)
GraphComputerVertexProgram to be executed by the GraphComputer.
There can only be one VertexProgram for the GraphComputer.program in interface GraphComputerprogram in class AbstractHadoopGraphComputervertexProgram - the VertexProgram to be executedpublic Future<ComputerResult> submit()
GraphComputersubmit in interface GraphComputerFuture 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 AbstractHadoopGraphComputerIOExceptionpublic GiraphGraphComputer.Features features()
features in interface GraphComputerfeatures in class AbstractHadoopGraphComputerCopyright © 2013–2016 Apache Software Foundation. All rights reserved.