org.apache.tinkerpop.gremlin.giraph.process.computer

## Class GiraphGraphComputer

- java.lang.Object
- - org.apache.tinkerpop.gremlin.hadoop.process.computer.AbstractHadoopGraphComputer
  - - org.apache.tinkerpop.gremlin.giraph.process.computer.GiraphGraphComputer

- All Implemented Interfaces:
    GraphComputer

      public final class GiraphGraphComputer
      extends AbstractHadoopGraphComputer
      implements GraphComputer

  Author:
    Marko A. Rodriguez (http://markorodriguez.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `GiraphGraphComputer.Features`

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.computer.GraphComputer

      `GraphComputer.Exceptions, GraphComputer.Persist, GraphComputer.ResultGraph`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected GiraphConfiguration` | `giraphConfiguration`

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.hadoop.process.computer.AbstractHadoopGraphComputer

      `executed, graphFilter, hadoopGraph, logger, mapReducers, persist, resultGraph, vertexProgram, workers`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GiraphGraphComputer(HadoopGraph hadoopGraph)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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()` Submit the `VertexProgram` and the set of `MapReduce` jobs for execution by the `GraphComputer`.
    `GraphComputer` | `workers(int workers)` Set the desired number of workers to execute the `VertexProgram` and `MapReduce` jobs.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.hadoop.process.computer.AbstractHadoopGraphComputer

      `copyDirectoryIfNonExistent, edges, loadJars, mapReduce, persist, result, toString, validateStatePriorToExecution, vertices`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.computer.GraphComputer

      `edges, mapReduce, persist, result, vertices`

- - ### Field Detail

    - #### giraphConfiguration

          protected GiraphConfiguration giraphConfiguration

  - ### Constructor Detail

    - #### GiraphGraphComputer

          public GiraphGraphComputer(HadoopGraph hadoopGraph)

  - ### Method Detail

    - #### workers

          public GraphComputer workers(int workers)

      Description copied from interface: `GraphComputer`
      Set the desired number of workers to execute the `VertexProgram` and `MapReduce` jobs. This is a recommendation to the underlying `GraphComputer` implementation and is allowed to deviate accordingly by the implementation.
      Specified by:
        `workers` in interface `GraphComputer`
      Overrides:
        `workers` in class `AbstractHadoopGraphComputer`
      Parameters:
        `workers` - the number of workers to execute the submission
      Returns:
        the updated GraphComputer with newly set worker count

    - #### configure

          public GraphComputer configure(String key,
                                         Object value)

      Description copied from interface: `GraphComputer`
      Set an arbitrary configuration key/value for the underlying `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.
      Specified by:
        `configure` in interface `GraphComputer`
      Parameters:
        `key` - the key of the configuration
        `value` - the value of the configuration
      Returns:
        the updated GraphComputer with newly set key/value configuration

    - #### program

          public GraphComputer program(VertexProgram vertexProgram)

      Description copied from interface: `GraphComputer`
      Set the `VertexProgram` to be executed by the `GraphComputer`. There can only be one VertexProgram for the GraphComputer.
      Specified by:
        `program` in interface `GraphComputer`
      Overrides:
        `program` in class `AbstractHadoopGraphComputer`
      Parameters:
        `vertexProgram` - the VertexProgram to be executed
      Returns:
        the updated GraphComputer with newly set VertexProgram

    - #### submit

          public Future<ComputerResult> submit()

      Description copied from interface: `GraphComputer`
      Submit the `VertexProgram` and the set of `MapReduce` jobs for execution by the `GraphComputer`.
      Specified by:
        `submit` in interface `GraphComputer`
      Returns:
        a `Future` denoting a reference to the asynchronous computation and where to get the `DefaultComputerResult` when its is complete.

    - #### run

          public int run(String[] args)

    - #### setConf

          public void setConf(org.apache.hadoop.conf.Configuration configuration)

    - #### getConf

          public org.apache.hadoop.conf.Configuration getConf()

    - #### loadJar

          protected void loadJar(org.apache.hadoop.conf.Configuration hadoopConfiguration,
                                 File file,
                                 Object... params)
                          throws IOException

      Specified by:
        `loadJar` in class `AbstractHadoopGraphComputer`
      Throws:
        `IOException`

    - #### main

          public static void main(String[] args)
                           throws Exception

      Throws:
        `Exception`

    - #### features

          public GiraphGraphComputer.Features features()

      Specified by:
        `features` in interface `GraphComputer`
      Overrides:
        `features` in class `AbstractHadoopGraphComputer`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.