You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/02/16 19:41:21 UTC

incubator-tinkerpop git commit: minor tweaks to the-graphcomputer docs.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 347eb9a82 -> fdfed8464


minor tweaks to the-graphcomputer docs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/fdfed846
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/fdfed846
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/fdfed846

Branch: refs/heads/master
Commit: fdfed8464be0398159885eeafac40079a6f6fed5
Parents: 347eb9a
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Feb 16 11:41:20 2015 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Feb 16 11:41:20 2015 -0700

----------------------------------------------------------------------
 docs/src/the-graphcomputer.asciidoc | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fdfed846/docs/src/the-graphcomputer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-graphcomputer.asciidoc b/docs/src/the-graphcomputer.asciidoc
index da15219..abecfe9 100644
--- a/docs/src/the-graphcomputer.asciidoc
+++ b/docs/src/the-graphcomputer.asciidoc
@@ -322,6 +322,19 @@ While 5 iterations were presented, in fact, `TraversalVertexProgram` will execut
 
 When the computation is complete a <<mapreduce,MapReduce>> job executes which aggregates all the `groupCount()` sideEffect Map (i.e. "`HashMap`") objects on each vertex into a single local representation (thus, turning the distributed Map representation into a local Map representation).
 
+////
+The same OLAP traversal can be executed using the standard `g.compute()` model, though at the expense of verbosity. `TraversalVertexProgram` provides a fluent `Builder` for constructing a `TraversalVertexProgram`. The specified `traversal()` can be either a `Supplier<Traversal>` object, a `Supplier<Traversal>` class, or a link:http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform[JSR-223] script that will generate (i.e. supply) a `Traversal`. If `traversal()` is supplied a single string, it is assumed that "gremlin-groovy" is the `ScriptEngine` to use. If two strings are supplied, then the first string denotes the `ScriptEngine` to evaluate the second string script with in order to generate (i.e. supply) the `Traversal`.
+
+[gremlin-groovy,modern]
+----
+//g.engine(ComputerTraversalEngine.instance())
+//result = g.compute().program(TraversalVertexProgram.build().traversal(g.V().both().hasLabel('person').values('age').groupCount('a')).create()).submit().get()
+//result.memory().a
+//result.memory().iteration
+//result.memory().runtime
+----
+////
+
 [[distributed-gremlin-gotchas]]
 Distributed Gremlin Gotchas
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^