[tinkerpop] branch tp33 updated (4a78c6b -> 993a443)

2019-03-25 Thread rdale
This is an automated email from the ASF dual-hosted git repository.

rdale pushed a change to branch tp33
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 4a78c6b  minor edit - ` won't render if end markup doesn't have 
trailing space - CTR
 add 993a443  more minor ` edits - CTR

No new revisions were added by this update.

Summary of changes:
 CHANGELOG.asciidoc | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)



[tinkerpop] branch master updated (d0f177f -> 350897a)

2019-03-25 Thread rdale
This is an automated email from the ASF dual-hosted git repository.

rdale pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from d0f177f  Merge branch 'tp33'
 new 993a443  more minor ` edits - CTR
 new 350897a  Merge branch 'tp33'

The 15062 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.asciidoc | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)



[tinkerpop] branch tp33 updated (45710b1 -> 4a78c6b)

2019-03-25 Thread rdale
This is an automated email from the ASF dual-hosted git repository.

rdale pushed a change to branch tp33
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


from 45710b1  Bound twine to 1.12.1 as latest version doesn't do auth right 
for some reason
 add 4a78c6b  minor edit - ` won't render if end markup doesn't have 
trailing space - CTR

No new revisions were added by this update.

Summary of changes:
 CHANGELOG.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[tinkerpop] branch tp4 updated: some code clean up on LocalMachine>

2019-03-25 Thread okram
This is an automated email from the ASF dual-hosted git repository.

okram pushed a commit to branch tp4
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/tp4 by this push:
 new 21c098d  some code clean up on LocalMachine>
21c098d is described below

commit 21c098d1e0c1fb0cf13f2fdae07a97bb7db4a54d
Author: Marko A. Rodriguez 
AuthorDate: Mon Mar 25 08:59:13 2019 -0600

some code clean up on LocalMachine>
---
 .../org/apache/tinkerpop/machine/LocalMachine.java | 25 --
 .../machine/bytecode/compiler/Compilation.java |  4 ++--
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git 
a/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/LocalMachine.java
 
b/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/LocalMachine.java
index 774a3aa..a5d4e27 100644
--- 
a/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/LocalMachine.java
+++ 
b/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/LocalMachine.java
@@ -47,18 +47,21 @@ public final class LocalMachine implements Machine {
 public  Bytecode register(Bytecode sourceCode) {
 sourceCode = sourceCode.clone(); // if the connection is local, don't 
mutate original
 final Optional id = LocalMachine.getSourceId(sourceCode);
-if (id.isPresent() && this.sources.containsKey(id.get())) {
-if (1 == sourceCode.getSourceInstructions().size())
-return sourceCode;
-final SourceCompilation source = (SourceCompilation) 
this.sources.get(id.get());
-BytecodeUtil.mergeSourceInstructions(source.getSourceCode(), 
sourceCode);
+if (id.isPresent()) {
+if (this.sources.containsKey(id.get())) {
+if (1 == sourceCode.getSourceInstructions().size())
+return sourceCode;
+final SourceCompilation source = (SourceCompilation) 
this.sources.get(id.get());
+BytecodeUtil.mergeSourceInstructions(source.getSourceCode(), 
sourceCode);
+}
 sourceCode.getInstructions().removeIf(i -> 
i.op().equals(WITH_SOURCE_CODE));
 }
 final UUID uuid = UUID.randomUUID();
 this.sources.put(uuid, new SourceCompilation<>(sourceCode));
-final Bytecode newSource = new Bytecode<>();
-newSource.addUniqueSourceInstruction(WITH_SOURCE_CODE, 
uuid.toString());
-return newSource;
+final Bytecode registeredBytecode = new Bytecode<>();
+registeredBytecode.addSourceInstruction(WITH_SOURCE_CODE, 
uuid.toString());
+
registeredBytecode.getInstructions().addAll(sourceCode.getInstructions()); // 
all bytecode is returned
+return registeredBytecode;
 }
 
 @Override
@@ -69,9 +72,9 @@ public final class LocalMachine implements Machine {
 @Override
 public  Iterator> submit(Bytecode bytecode) {
 bytecode = bytecode.clone();
-final UUID sourceId = LocalMachine.getSourceId(bytecode).orElse(null);
-final SourceCompilation source = null == sourceId ? null : 
(SourceCompilation) this.sources.get(sourceId);
-return null == sourceId ?
+final UUID sourceId = 
LocalMachine.getSourceId(bytecode).orElse(UUID.randomUUID());
+final SourceCompilation source = (SourceCompilation) 
this.sources.get(sourceId);
+return null == source ?
 Compilation.compile(bytecode).getProcessor() :
 Compilation.compile(source, 
bytecode).getProcessor();
 }
diff --git 
a/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/bytecode/compiler/Compilation.java
 
b/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/bytecode/compiler/Compilation.java
index 3193685..5c02215 100644
--- 
a/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/bytecode/compiler/Compilation.java
+++ 
b/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/bytecode/compiler/Compilation.java
@@ -62,10 +62,10 @@ public final class Compilation implements 
Serializable {
 }
 
 public Compilation(final ProcessorFactory processorFactory) {
-this.functions = Collections.emptyList(); // TODO: somehow strings for 
primitive processors
-this.structureFactory = null;
+this.structureFactory = EmptyStructure.instance();
 this.processorFactory = processorFactory;
 this.traverserFactory = null;
+this.functions = Collections.emptyList(); // TODO: somehow strings for 
primitive processors
 }
 
 public Processor getProcessor() {



svn commit: r1856180 - in /tinkerpop/site: downloads.html gremlin.html index.html policy.html providers.html

2019-03-25 Thread spmallette
Author: spmallette
Date: Mon Mar 25 12:26:50 2019
New Revision: 1856180

URL: http://svn.apache.org/viewvc?rev=1856180=rev
Log:
Deploy TinkerPop homepage

Modified:
tinkerpop/site/downloads.html
tinkerpop/site/gremlin.html
tinkerpop/site/index.html
tinkerpop/site/policy.html
tinkerpop/site/providers.html

Modified: tinkerpop/site/downloads.html
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/downloads.html?rev=1856180=1856179=1856180=diff
==
--- tinkerpop/site/downloads.html (original)
+++ tinkerpop/site/downloads.html Mon Mar 25 12:26:50 2019
@@ -75,16 +75,16 @@ limitations under the License.
   Documentation 
   
   
- Latest: 3.4.0 
(2-Jan-2019)
- http://tinkerpop.apache.org/docs/current;>TinkerPop 3.4.0
+ Latest: 3.4.1 
(18-Mar-2019)
+ http://tinkerpop.apache.org/docs/current;>TinkerPop 3.4.1
  http://tinkerpop.apache.org/docs/current/upgrade;>Upgrade 
Information
  http://tinkerpop.apache.org/javadocs/current/core/;>Core Javadoc 
API
  http://tinkerpop.apache.org/javadocs/current/full/;>Full Javadoc 
API
  
- Maintenance: 3.3.5 
(2-Jan-2019)
- http://tinkerpop.apache.org/docs/3.3.5/;>TinkerPop 3.3.5
- http://tinkerpop.apache.org/javadocs/3.3.5/core/;>Core Javadoc 
API
- http://tinkerpop.apache.org/javadocs/3.3.5/full/;>Full Javadoc 
API
+ Maintenance: 3.3.6 
(18-Mar-2019)
+ http://tinkerpop.apache.org/docs/3.3.6/;>TinkerPop 3.3.6
+ http://tinkerpop.apache.org/javadocs/3.3.6/core/;>Core Javadoc 
API
+ http://tinkerpop.apache.org/javadocs/3.3.6/full/;>Full Javadoc 
API
  
  http://tinkerpop.apache.org/docs/;>Documentation Archives
  http://tinkerpop.apache.org/javadocs/;>Javadoc Archives
@@ -166,59 +166,40 @@ limitations under the License.
 
 
 
-3.4.0 (latest, stable)
+3.4.1 (latest, stable)
 
 
-2-Jan-2019
+18-Mar-2019
 
 
-https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asciidoc#release-3-4-0;>release
 notes |
-http://tinkerpop.apache.org/docs/3.4.0/upgrade/#_tinkerpop_3_4_0;>upgrade
 |
-http://tinkerpop.apache.org/docs/3.4.0/;>documentation |
-contributors
+https://github.com/apache/tinkerpop/blob/3.4.1/CHANGELOG.asciidoc#release-3-4-1;>release
 notes |
+http://tinkerpop.apache.org/docs/3.4.1/upgrade/#_tinkerpop_3_4_1;>upgrade
 |
+http://tinkerpop.apache.org/docs/3.4.1/;>documentation |
+contributors
 
 
-https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.0/apache-tinkerpop-gremlin-console-3.4.0-bin.zip;
 class="btn btn-primary">Gremlin Console 
-https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.0/apache-tinkerpop-gremlin-server-3.4.0-bin.zip;
 class="btn btn-primary">Gremlin Server 
-https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.0/apache-tinkerpop-3.4.0-src.zip;
 class="btn btn-primary">Source 
+https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.1/apache-tinkerpop-gremlin-console-3.4.1-bin.zip;
 class="btn btn-primary">Gremlin Console 
+https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.1/apache-tinkerpop-gremlin-server-3.4.1-bin.zip;
 class="btn btn-primary">Gremlin Server 
+https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.1/apache-tinkerpop-3.4.1-src.zip;
 class="btn btn-primary">Source 
 
 
 
 
-3.3.5 (maintenance)
+3.3.6 (maintenance)
 
 
-2-Jan-2019
+18-Mar-2019
 
 
-https://github.com/apache/tinkerpop/blob/3.3.5/CHANGELOG.asciidoc#release-3-3-5;>release
 notes |
-http://tinkerpop.apache.org/docs/3.3.5/upgrade/#_tinkerpop_3_3_5;>upgrade
 |
-http://tinkerpop.apache.org/docs/3.3.5/;>documentation |
-contributors
+https://github.com/apache/tinkerpop/blob/3.3.6/CHANGELOG.asciidoc#release-3-3-6;>release
 notes |
+http://tinkerpop.apache.org/docs/3.3.6/upgrade/#_tinkerpop_3_3_6;>upgrade
 |
+http://tinkerpop.apache.org/docs/3.3.6/;>documentation |
+contributors
 
 
-https://www.apache.org/dyn/closer.lua/tinkerpop/3.3.5/apache-tinkerpop-gremlin-console-3.3.5-bin.zip;
 

svn commit: r1856181 - in /tinkerpop/site: docs/current javadocs/current

2019-03-25 Thread spmallette
Author: spmallette
Date: Mon Mar 25 12:27:57 2019
New Revision: 1856181

URL: http://svn.apache.org/viewvc?rev=1856181=rev
Log:
Deploy docs for TinkerPop 3.4.1

Added:
tinkerpop/site/docs/current   (with props)
tinkerpop/site/javadocs/current   (with props)

Added: tinkerpop/site/docs/current
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/docs/current?rev=1856181=auto
==
--- tinkerpop/site/docs/current (added)
+++ tinkerpop/site/docs/current Mon Mar 25 12:27:57 2019
@@ -0,0 +1 @@
+link 3.4.1
\ No newline at end of file

Propchange: tinkerpop/site/docs/current
--
svn:special = *

Added: tinkerpop/site/javadocs/current
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/javadocs/current?rev=1856181=auto
==
--- tinkerpop/site/javadocs/current (added)
+++ tinkerpop/site/javadocs/current Mon Mar 25 12:27:57 2019
@@ -0,0 +1 @@
+link 3.4.1
\ No newline at end of file

Propchange: tinkerpop/site/javadocs/current
--
svn:special = *




svn commit: r33179 - in /release/tinkerpop: 3.2.11/ 3.3.5/ 3.4.0/

2019-03-25 Thread spmallette
Author: spmallette
Date: Mon Mar 25 12:36:25 2019
New Revision: 33179

Log:
Remove old TinkerPop releases 3.2.11, 3.3.5, 3.4.0

Removed:
release/tinkerpop/3.2.11/
release/tinkerpop/3.3.5/
release/tinkerpop/3.4.0/



[tinkerpop] branch master updated: Fixed current version to 3.4.1 on home page CTR

2019-03-25 Thread spmallette
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ebf1aad  Fixed current version to 3.4.1 on home page CTR
ebf1aad is described below

commit ebf1aad3a233ed3d5354f6c387386472bac50906
Author: Stephen Mallette 
AuthorDate: Mon Mar 25 08:24:08 2019 -0400

Fixed current version to 3.4.1 on home page CTR
---
 docs/site/home/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/site/home/index.html b/docs/site/home/index.html
index 010a112..f4f0873 100644
--- a/docs/site/home/index.html
+++ b/docs/site/home/index.html
@@ -26,7 +26,7 @@ limitations under the License.
 
 
 
-TinkerPop 3.4.0 
(Released: 18-Mar-2019)
+TinkerPop 3.4.1 
(Released: 18-Mar-2019)
 Downloads
 
https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.1/apache-tinkerpop-gremlin-console-3.4.1-bin.zip;
 class="btn btn-primary">Gremlin Console 



[tinkerpop] branch tp4 updated: LocalMachineTest added. TraversalSource cleaned up -- no more worrying about strategy compilation on the client side -- makes no sense anymore with Machine.register(sou

2019-03-25 Thread okram
This is an automated email from the ASF dual-hosted git repository.

okram pushed a commit to branch tp4
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/tp4 by this push:
 new 596caf3  LocalMachineTest added. TraversalSource cleaned up -- no more 
worrying about strategy compilation on the client side -- makes no sense 
anymore with Machine.register(sourceCode). Sweet.
596caf3 is described below

commit 596caf3ab82f3b15c2c343af87be6d03f26d6d6e
Author: Marko A. Rodriguez 
AuthorDate: Mon Mar 25 06:08:48 2019 -0600

LocalMachineTest added. TraversalSource cleaned up -- no more worrying 
about strategy compilation on the client side -- makes no sense anymore with 
Machine.register(sourceCode). Sweet.
---
 .../language/gremlin/TraversalSource.java  | 10 ---
 .../machine/{Machine.java => BasicMachine.java}| 26 +--
 .../org/apache/tinkerpop/machine/LocalMachine.java | 22 --
 .../java/org/apache/tinkerpop/machine/Machine.java |  4 +-
 .../machine/bytecode/compiler/Compilation.java |  2 +-
 .../bytecode/compiler/SourceCompilation.java   |  5 +-
 .../machine/processor/EmptyProcessor.java  | 64 +
 .../apache/tinkerpop/machine/LocalMachineTest.java | 81 ++
 8 files changed, 188 insertions(+), 26 deletions(-)

diff --git 
a/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/TraversalSource.java
 
b/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/TraversalSource.java
index 2eed977..fa2d29f 100644
--- 
a/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/TraversalSource.java
+++ 
b/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/TraversalSource.java
@@ -19,7 +19,6 @@
 package org.apache.tinkerpop.language.gremlin;
 
 import org.apache.tinkerpop.language.gremlin.common.CommonTraversal;
-import org.apache.tinkerpop.machine.LocalMachine;
 import org.apache.tinkerpop.machine.Machine;
 import org.apache.tinkerpop.machine.bytecode.Bytecode;
 import org.apache.tinkerpop.machine.bytecode.BytecodeUtil;
@@ -43,8 +42,6 @@ public class TraversalSource implements Cloneable {
 private Bytecode bytecode;
 private Coefficient coefficient = (Coefficient) 
LongCoefficient.create();
 private boolean registered = false;
-// private Set sortedStrategies (will be more efficient to 
precompute sort order)
-// private Machine machine (will be more efficient for remote connections)
 
 TraversalSource(final Machine machine) {
 this.machine = machine;
@@ -52,7 +49,6 @@ public class TraversalSource implements Cloneable {
 this.bytecode.addSourceInstruction(Symbols.WITH_STRATEGY, 
CoefficientStrategy.class); // TODO: remove when strategies full integrated
 this.bytecode.addSourceInstruction(Symbols.WITH_STRATEGY, 
CoefficientVerificationStrategy.class);
 this.bytecode.addSourceInstruction(Symbols.WITH_STRATEGY, 
ExplainStrategy.class);
-this.bytecode.addSourceInstruction(Symbols.WITH_MACHINE, 
LocalMachine.class);
 }
 
 public TraversalSource withCoefficient(final Class> coefficient) {
@@ -62,12 +58,6 @@ public class TraversalSource implements Cloneable {
 return clone;
 }
 
-public TraversalSource withMachine(final Class 
machine) {
-final TraversalSource clone = this.clone();
-clone.bytecode.addUniqueSourceInstruction(Symbols.WITH_MACHINE, 
machine);
-return clone;
-}
-
 public TraversalSource withProcessor(final Class processor) {
 final TraversalSource clone = this.clone();
 clone.bytecode.addSourceInstruction(Symbols.WITH_PROCESSOR, processor);
diff --git 
a/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/Machine.java
 
b/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/BasicMachine.java
similarity index 66%
copy from 
java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/Machine.java
copy to 
java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/BasicMachine.java
index 34d8403..27cfc58 100644
--- 
a/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/Machine.java
+++ 
b/java/machine/machine-core/src/main/java/org/apache/tinkerpop/machine/BasicMachine.java
@@ -19,6 +19,7 @@
 package org.apache.tinkerpop.machine;
 
 import org.apache.tinkerpop.machine.bytecode.Bytecode;
+import org.apache.tinkerpop.machine.bytecode.compiler.Compilation;
 import org.apache.tinkerpop.machine.traverser.Traverser;
 
 import java.util.Iterator;
@@ -26,11 +27,28 @@ import java.util.Iterator;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public interface Machine {
+public final class BasicMachine implements Machine {
 
-public  Bytecode register(final Bytecode sourceCode);
+private BasicMachine() {
+// use open();
+}
 
-public  void close(final Bytecode 

[tinkerpop] branch tp4 updated: I have worked out the concept of always submitting Bytecode to a Machine. The Machine is able to precompile source instructions (e.g. strategies, database and processor

2019-03-25 Thread okram
This is an automated email from the ASF dual-hosted git repository.

okram pushed a commit to branch tp4
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/tp4 by this push:
 new a9fb2e0  I have worked out the concept of always submitting Bytecode 
to a Machine. The Machine is able to precompile source instructions (e.g. 
strategies, database and processor connections). LocalMachine is simple thread 
safe machine for use on the local computer. Very neat model.
a9fb2e0 is described below

commit a9fb2e0db252a2fc08e2e1809c7afd2a80ce8b4d
Author: Marko A. Rodriguez 
AuthorDate: Mon Mar 25 05:30:29 2019 -0600

I have worked out the concept of always submitting Bytecode to a Machine. 
The Machine is able to precompile source instructions (e.g. strategies, 
database and processor connections). LocalMachine is simple thread safe machine 
for use on the local computer. Very neat model.
---
 .../language/gremlin/AbstractTraversal.java| 10 ++--
 .../apache/tinkerpop/language/gremlin/Gremlin.java |  6 +-
 .../language/gremlin/TraversalSource.java  | 23 +++-
 .../language/gremlin/common/CommonTraversal.java   |  7 ++-
 .../language/gremlin/core/CoreTraversal.java   |  7 ++-
 .../org/apache/tinkerpop/machine/LocalMachine.java | 48 ++-
 .../java/org/apache/tinkerpop/machine/Machine.java |  4 ++
 .../tinkerpop/machine/bytecode/BytecodeUtil.java   | 27 -
 .../machine/bytecode/compiler/Compilation.java | 14 -
 .../bytecode/compiler/CompositeCompiler.java   |  5 ++
 .../bytecode/compiler/SourceCompilation.java   | 69 ++
 .../strategy/decoration/ExplainStrategy.java   |  4 +-
 .../CoefficientVerificationStrategy.java   |  3 +-
 .../tinkerpop/machine/processor/beam/BeamTest.java | 11 +++-
 .../machine/processor/pipes/PipesTest.java | 11 +++-
 15 files changed, 207 insertions(+), 42 deletions(-)

diff --git 
a/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/AbstractTraversal.java
 
b/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/AbstractTraversal.java
index 5c35849..3d2811c 100644
--- 
a/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/AbstractTraversal.java
+++ 
b/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/AbstractTraversal.java
@@ -18,8 +18,8 @@
  */
 package org.apache.tinkerpop.language.gremlin;
 
+import org.apache.tinkerpop.machine.Machine;
 import org.apache.tinkerpop.machine.bytecode.Bytecode;
-import org.apache.tinkerpop.machine.bytecode.BytecodeUtil;
 import org.apache.tinkerpop.machine.coefficient.Coefficient;
 import org.apache.tinkerpop.machine.traverser.Traverser;
 
@@ -32,8 +32,9 @@ import java.util.List;
  */
 public abstract class AbstractTraversal implements Traversal 
{
 
-protected Coefficient currentCoefficient;
+private final Machine machine;
 protected final Bytecode bytecode;
+protected Coefficient currentCoefficient;
 private Iterator> traversers = null;
 private boolean locked = false;
 
@@ -41,7 +42,8 @@ public abstract class AbstractTraversal implements 
Traversal {
 private long lastCount = 0L;
 private E lastObject = null;
 
-public AbstractTraversal(final Bytecode bytecode, final Coefficient 
unity) {
+public AbstractTraversal(final Machine machine, final Bytecode 
bytecode, final Coefficient unity) {
+this.machine = machine;
 this.bytecode = bytecode;
 this.currentCoefficient = unity.clone();
 }
@@ -59,7 +61,7 @@ public abstract class AbstractTraversal implements 
Traversal {
 private final void prepareTraversal() {
 if (!this.locked) {
 this.locked = true;
-this.traversers = 
BytecodeUtil.getMachine(this.bytecode).get().submit(this.bytecode);
+this.traversers = this.machine.submit(this.bytecode);
 }
 }
 
diff --git 
a/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/Gremlin.java
 
b/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/Gremlin.java
index fdd4981..b739a16 100644
--- 
a/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/Gremlin.java
+++ 
b/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/Gremlin.java
@@ -18,12 +18,14 @@
  */
 package org.apache.tinkerpop.language.gremlin;
 
+import org.apache.tinkerpop.machine.Machine;
+
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
 public final class Gremlin {
 
-public static  TraversalSource traversal() {
-return new TraversalSource<>();
+public static  TraversalSource traversal(final Machine machine) {
+return new TraversalSource<>(machine);
 }
 }
diff --git 
a/java/language/gremlin/src/main/java/org/apache/tinkerpop/language/gremlin/TraversalSource.java