You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/08/04 22:39:51 UTC

[1/3] tinkerpop git commit: Add some basic docs about Traversal OpProcessor.

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1278 52d354e24 -> 2f14e1d8f


Add some basic docs about Traversal OpProcessor.


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

Branch: refs/heads/TINKERPOP-1278
Commit: 1f5fe7fe20cd51d9f48bcb603204d1af8cf7b944
Parents: 735a9f6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 4 18:03:41 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 4 18:03:41 2016 -0400

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc | 47 ++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1f5fe7fe/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 90ab5c0..7e90e9a 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -837,7 +837,7 @@ evaluated and is committed when the script completes (or rolled back if an error
 |bindings |Map |A map of key/value pairs to apply as variables in the context of the Gremlin script.
 |language |String |The flavor of Gremlin used (e.g. `gremlin-groovy`).
 |aliases |Map |A map of key/value pairs that allow globally bound `Graph` and `TraversalSource` objects to
-be aliased to different variable names for purposes of the current request.  The value represents the name the
+be aliased to different variable names for purposes of the current request.  The value represents the name of the
 global variable and its key represents the new binding name as it will be referenced in the Gremlin query.  For
 example, if the Gremlin Server defines two `TraversalSource` instances named `g1` and `g2`, it would be possible
 to send an alias pair with key of "g" and value of "g2" and thus allow the script to refer to "g2" simply as "g".
@@ -899,6 +899,51 @@ to send an alias pair with key of "g" and value of "g2" and thus allow the scrip
 |session |String | *Required* The session identifier for the session to close.
 |=========================================================
 
+Traversal OpProcessor
+^^^^^^^^^^^^^^^^^^^^^
+
+Both the Standard and Session OpProcessors allow for Gremlin scripts to be submitted to the server. The Traversal
+OpProcessor however allows Gremlin `Bytecode` to be submitted to the server. Supporting this OpProcessor makes it
+possible to submit a `Traversal` directly to Gremlin Server allowing
+link:http://tinkerpop.apache.org/docs/current/tutorials/gremlin-language-variants/[Gremlin Language Variants] to
+directly submit a `Traversal` in the native language of the GLV without having to use a script in a different language.
+
+[width="100%",cols="3,10a",options="header"]
+|=========================================================
+|Key |Description
+|processor |This value should be set to `traversal`
+|op |
+[cols="3,10",options="header"]
+!=========================================================
+!Key !Description
+!`authentication` !A request that contains the response to a server challenge for authentication.
+!`bytecode` !A request that contains the `Bytecode` representation of a `Traversal`.
+|=========================================================
+
+'`authentication` operation arguments'
+[width="100%",cols="2,2,9",options="header"]
+|=========================================================
+|Key |Type |Description
+|sasl |byte[] | *Required* The response to the server authentication challenge.  This value is dependent on the SASL authentication mechanism required by the server.
+|=========================================================
+
+'`bytecode` operation arguments'
+[width="100%",cols="2,2,9",options="header"]
+|=========================================================
+|Key |Type |Description
+|gremlin |String | *Required* The `Bytecode` representation of a `Traversal`.
+|aliases |Map | *Required* A map with a single key/value pair that refers to a globally bound `TraversalSource` object
+to be aliased to different variable names for purposes of the current request.  The value represents the name of the
+global variable and its key represents the new binding name as it will be referenced in the Gremlin query.  For
+example, if the Gremlin Server defines two `TraversalSource` instances named `g1`, it would be possible
+to send an alias pair with key of "g" and value of "g1" and thus allow the script to refer to "g1" simply as "g".
+|=========================================================
+
+Unlike Standard and Session OpProcessors, the Traversal OpProcessor does not simply return the results of the
+`Traversal`. It instead returns a representation of the `Traverser` objects and any side-effects produced by the
+`Traversal` itself.
+
+
 Authentication
 ~~~~~~~~~~~~~~
 


[2/3] tinkerpop git commit: Remove more bits of the old traversal op command

Posted by sp...@apache.org.
Remove more bits of the old traversal op command


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

Branch: refs/heads/TINKERPOP-1278
Commit: 4e1586b3a8ee64b037a0b5d59a56e928e372a8a9
Parents: 1f5fe7f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 4 18:38:32 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 4 18:38:32 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java  | 6 ------
 .../gremlin/server/op/traversal/TraversalOpProcessor.java      | 6 +++---
 2 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4e1586b3/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
index 1e34bf2..00858ff 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
@@ -70,12 +70,6 @@ public final class Tokens {
     @Deprecated
     public static final String OPS_VERSION = "version";
 
-    /**
-     * @deprecated As of release 3.2.2, replaced by {@link #OPS_BYTECODE}.
-     */
-    @Deprecated
-    public static final String OPS_TRAVERSE = "traverse";
-
     public static final String ARGS_BATCH_SIZE = "batchSize";
     public static final String ARGS_BINDINGS = "bindings";
     public static final String ARGS_ALIASES = "aliases";

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4e1586b3/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
index 2f0714a..bfcd014 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
@@ -105,18 +105,18 @@ public class TraversalOpProcessor extends AbstractOpProcessor {
 
     private static Map<String,String> validateTraversalRequest(final RequestMessage message) throws OpProcessorException {
         if (!message.optionalArgs(Tokens.ARGS_GREMLIN).isPresent()) {
-            final String msg = String.format("A message with an [%s] op code requires a [%s] argument.", Tokens.OPS_TRAVERSE, Tokens.ARGS_GREMLIN);
+            final String msg = String.format("A message with an [%s] op code requires a [%s] argument.", Tokens.OPS_BYTECODE, Tokens.ARGS_GREMLIN);
             throw new OpProcessorException(msg, ResponseMessage.build(message).code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).statusMessage(msg).create());
         }
 
         final Optional<Map<String, String>> aliases = message.optionalArgs(Tokens.ARGS_ALIASES);
         if (!aliases.isPresent()) {
-            final String msg = String.format("A message with an [%s] op code requires a [%s] argument.", Tokens.OPS_TRAVERSE, Tokens.ARGS_ALIASES);
+            final String msg = String.format("A message with an [%s] op code requires a [%s] argument.", Tokens.OPS_BYTECODE, Tokens.ARGS_ALIASES);
             throw new OpProcessorException(msg, ResponseMessage.build(message).code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).statusMessage(msg).create());
         }
 
         if (aliases.get().size() != 1) {
-            final String msg = String.format("A message with an [%s] op code requires the [%s] argument to be a Map containing one alias assignment.", Tokens.OPS_TRAVERSE, Tokens.ARGS_ALIASES);
+            final String msg = String.format("A message with an [%s] op code requires the [%s] argument to be a Map containing one alias assignment.", Tokens.OPS_BYTECODE, Tokens.ARGS_ALIASES);
             throw new OpProcessorException(msg, ResponseMessage.build(message).code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).statusMessage(msg).create());
         }
 


[3/3] tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1278' into TINKERPOP-1278

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1278' into TINKERPOP-1278


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

Branch: refs/heads/TINKERPOP-1278
Commit: 2f14e1d8f9f6ced0f23d2253e0a8181e9a619aff
Parents: 4e1586b 52d354e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 4 18:39:33 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 4 18:39:33 2016 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/python/TraversalSourceGenerator.groovy | 7 ++++---
 .../src/main/jython/gremlin_python/driver/__init__.py        | 1 +
 .../main/jython/gremlin_python/driver/remote_connection.py   | 8 +++++++-
 .../jython/gremlin_python/driver/rest_remote_connection.py   | 7 ++++---
 .../src/main/jython/gremlin_python/process/traversal.py      | 7 ++++---
 .../src/main/jython/gremlin_python/structure/remote_graph.py | 6 ++++--
 6 files changed, 24 insertions(+), 12 deletions(-)
----------------------------------------------------------------------