anchor.diff:  
   image:spark-logo.png[width=175,float=left] link:http://spark.apache.org[Spark] is an Apache Software Foundation project focused on general-purpose OLAP data processing. Spark provides a hybrid in-memory/disk-based distributed computing model that is similar to Hadoop's MapReduce model. Spark maintains a fluent function chaining DSL that is arguably easier for developers to work with than native Hadoop MapReduce. While Spark has a shorter startup time between "jobs" (a scatter/gather-step), the actual message passing algorithm (as designed by TinkerPop) is less efficient than that of Giraph. For small graphs, Spark will typically be much faster than Giraph, but as the graph becomes larger, the Hadoop MapReduce startup time incurred by Giraph will amortize as more time is spent passing messages (i.e. traversers) between the vertices of the graph.
   
  -[source,text]
  -gremlin> g = graph.traversal(computer(SparkGraphComputer))
  -==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], sparkgraphcomputer]
  -gremlin> g.V().count()
  -==>6
  -gremlin> g.V().out().out().values('name')
  -==>lop
  -==>ripple
  +[gremlin-groovy]
  +----
  +graph = GraphFactory.open('conf/hadoop/hadoop-gryo.properties')
  +g = graph.traversal(computer(SparkGraphComputer))
  +g.V().count()
  +g.V().out().out().values('name')
  +----
   
   For using lambdas in Gremlin-Groovy, simply provide `:remote connect` a `TraversalSource` which leverages SparkGraphComputer.
   
  
positive.code: <1> schema mutations must happen in a different tx than graph mutations
  
  Below demonstrates the runtime benefits of indices and demonstrates how if there is no defined index (only vertex labels), a linear scan of the vertex-label partition is still faster than a linear scan of all vertices.
  
  [source,groovy]
  gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
  ==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
  gremlin> g = graph.traversal(standard())
  ==>graphtraversalsource[neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]], standard]
  gremlin> graph.io(graphml()).readGraph('data/grateful-dead.xml')
  ==>null
  gremlin> graph.tx().commit()
  ==>null
  gremlin> graph.cypher('CREATE INDEX ON :artist(name)') <1>
  gremlin> graph.tx().commit()
  ==>null
  gremlin> clock(1000){g.V().hasLabel('artist').has('name','Garcia').iterate()}  <2>
  ==>0.038828967
  gremlin> clock(1000){g.V().has('name','Garcia').iterate()} <3>
  ==>0.6623919649999999
  gremlin> graph.cypher('DROP INDEX ON :artist(name)') <4>
  gremlin> g.tx().commit()
  ==>null
  gremlin> clock(1000){g.V().hasLabel('artist').has('name','Garcia').iterate()} <5>
  ==>0.29597517599999995
  gremlin> clock(1000){g.V().has('name','Garcia').iterate()} <6>
  ==>0.6685323479999999
  
  [gremlin-groovy]
  ----
  
negative.code: 
  CAUTION: OLTP operations on `HadoopGraph` are not efficient. They require linear scans to execute and are unreasonable for large graphs. In such large graph situations, make use of <<traversalvertexprogram,TraversalVertexProgram>> which is the OLAP implementation of the Gremlin language. Hadoop-Gremlin provides various `GraphComputer` implementations to execute OLAP computations over a `HadoopGraph`.
  
  [gremlin-groovy]
  ----
  hdfs.copyFromLocal('data/tinkerpop-modern.kryo', 'tinkerpop-modern.kryo')
  