tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [tinkerpop] branch TINKERPOP-2050 updated: TINKERPOP-2050 Added docs for :bytecode command
Date Mon, 05 Nov 2018 11:32:58 GMT
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2050
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

The following commit(s) were added to refs/heads/TINKERPOP-2050 by this push:
     new a97caa7  TINKERPOP-2050 Added docs for :bytecode command
a97caa7 is described below

commit a97caa73d26b2fd376ac4711d40545bd7384903f
Author: Stephen Mallette <spmva@genoprime.com>
AuthorDate: Mon Nov 5 06:32:19 2018 -0500

    TINKERPOP-2050 Added docs for :bytecode command
 CHANGELOG.asciidoc                               |  1 +
 docs/src/reference/gremlin-applications.asciidoc | 27 ++++++++++++++++++++++++
 docs/src/upgrade/release-3.3.x.asciidoc          | 23 ++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ac8cba8..e652da9 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 This release also includes changes from <<release-3-2-11, 3.2.11>>.
+* Added `:bytecode` command to help developers debugging `Bytecode`-based traversals.
 * Fixed `PersistedOutputRDD` to eager persist RDD by adding `count()` action calls.
 * gremlin-python: the graphson deserializer for g:Set should return a python set
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 7db2ad9..d47b236 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -159,8 +159,35 @@ some other useful operations.  The following table outlines the most
commonly us
 |:plugin |:pin |Plugin management functions to list, activate and deactivate available plugins.
 |:remote |:rem |Configures a "remote" context where Gremlin or results of Gremlin will be
processed via usage of `:submit`.
 |:submit |:> |Submit Gremlin to the currently active context defined by `:remote`.
+|:bytecode |:bc |Provides options for translating and evaluating `Bytecode` for debugging
+Many of the above commands are described elsewhere or are generally self explanatory, but
the `:bytecode` command
+could use some additional explanation. The following code shows example usage:
+gremlin> g = TinkerFactory.createModern().traversal()
+==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
+gremlin> :bytecode from g.V().out('knows')  <1>
+gremlin> :bytecode translate g {"@type":"g:Bytecode","@value":{"step":[["V"],["out","knows"]]}}
+gremlin> :bytecode eval g {"@type":"g:Bytecode","@value":{"step":[["V"],["out","knows"]]}}
+gremlin> :remote connect tinkerpop.server conf/remote.yaml
+==>Configured localhost/
+gremlin> :bytecode submit g {"@type":"g:Bytecode","@value":{"step":[["V"],["out","knows"]]}}
+<1> Generates a GraphSON 3.0 representation of the traversal as bytecode.
+<2> Converts bytecode in GraphSON 3.0 format to a traversal string.
+<3> Converts bytecode in GraphSON 3.0 format to a traversal string which is evaluated
against "g" where "g" should be a valid graph instance.
+<4> Converts bytecode in GraphSON 3.0 format to a traversal string and submits it remotely
as a string to the current `:remote`.
 === Console Preferences
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index 1cb2dbf..f821aa5 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -27,6 +27,29 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 Please see the link:https://github.com/apache/tinkerpop/blob/3.3.5/CHANGELOG.asciidoc#release-3-3-5[changelog]
for a complete list of all the modifications that are part of this release.
+=== Upgrading for Users
+==== Bytecode Command
+The Gremlin Console now has a new `:bytecode` command to help users work more directly with
Gremlin bytecode. The
+command is more of a debugging tool than something that would be used for every day purposes.
It is sometimes helpful
+to look at Gremlin bytecode directly and the process for viewing it in human readable format
is not a single step
+process. It is also not immediately clear how to convert bytecode to a Gremlin string. The
`:bytecode` command aims to
+help with both of these issues:
+gremlin> g = TinkerFactory.createModern().traversal()
+==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
+gremlin> :bytecode from g.V().out('knows')  <1>
+gremlin> :bytecode translate g {"@type":"g:Bytecode","@value":{"step":[["V"],["out","knows"]]}}
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-2050[TINKERPOP-2050],
+link:http://tinkerpop.apache.org/docs/3.3.5/reference/#_console_commands[Reference Documentation
- Console Commands]
 == TinkerPop 3.3.4
 *Release Date: October 15, 2018*

View raw message