org.apache.tinkerpop.gremlin.spark.process.computer

## Class SparkGraphComputer

- java.lang.Object
- - org.apache.tinkerpop.gremlin.hadoop.process.computer.AbstractHadoopGraphComputer
  - - org.apache.tinkerpop.gremlin.spark.process.computer.SparkGraphComputer

- All Implemented Interfaces:
    GraphComputer

      public final class SparkGraphComputer
      extends AbstractHadoopGraphComputer

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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.hadoop.process.computer.AbstractHadoopGraphComputer

      `AbstractHadoopGraphComputer.Features`

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

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

  - ### Field Summary

    - ### 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
    `SparkGraphComputer(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`.
    `protected void` | `loadJar(Configuration hadoopConfiguration, File file, Object... params)`
    `static void` | `main(String[] args)`
    `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, features, loadJars, mapReduce, persist, program, result, toString, validateStatePriorToExecution, vertices`

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

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

- - ### Constructor Detail

    - #### SparkGraphComputer

          public SparkGraphComputer(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.
      Parameters:
        `key` - the key of the configuration
        `value` - the value of the configuration
      Returns:
        the updated GraphComputer with newly set key/value configuration

    - #### submit

          public Future<ComputerResult> submit()

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

    - #### loadJar

          protected void loadJar(Configuration hadoopConfiguration,
                                 File file,
                                 Object... params)

      Specified by:
        `loadJar` in class `AbstractHadoopGraphComputer`

    - #### main

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

      Throws:
        `Exception`

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