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 2018/04/25 11:41:49 UTC

[1/5] tinkerpop git commit: TINKERPOP-1947 Fixed path history problem with mutations [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1950 4fa21313b -> cd20298d3 (forced update)


TINKERPOP-1947 Fixed path history problem with mutations

When a key of a mutation was a traversal it was not being integrated to the parent traversal and tracked in the Parameters.


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

Branch: refs/heads/TINKERPOP-1950
Commit: 8fbfab7947d3cf547f7c27025be6876c5d86a1a4
Parents: b99c56a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 19 14:25:33 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 19 14:25:33 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../process/traversal/step/util/Parameters.java | 30 +++++++++++---------
 .../step/map/GroovyAddVertexTest.groovy         |  5 ++++
 gremlin-test/features/map/AddVertex.feature     | 27 ++++++++++++++++++
 .../traversal/step/map/AddVertexTest.java       | 20 +++++++++++--
 5 files changed, 68 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fbfab79/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0f3a71a..6f7baa5 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-9]]
 === TinkerPop 3.2.9 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Fixed bug where path history was not being preserved for keys in mutations.
 * Bumped to httpclient 4.5.5.
 
 [[release-3-2-8]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fbfab79/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
index 7fae30a..d368322 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
@@ -174,26 +174,30 @@ public final class Parameters implements Cloneable, Serializable {
         if (keyValues.length % 2 != 0)
             throw Element.Exceptions.providedKeyValuesMustBeAMultipleOfTwo();
 
-        for (int i = 0; i < keyValues.length; i = i + 2) {
-            if (!(keyValues[i] instanceof String) && !(keyValues[i] instanceof T) && !(keyValues[i] instanceof Traversal))
+        for (int ix = 0; ix < keyValues.length; ix = ix + 2) {
+            if (!(keyValues[ix] instanceof String) && !(keyValues[ix] instanceof T) && !(keyValues[ix] instanceof Traversal))
                 throw new IllegalArgumentException("The provided key/value array must have a String, T, or Traversal on even array indices");
 
-            if (keyValues[i + 1] != null) {
-                // track the list of traversals that are present so that elsewhere in Parameters there is no need
-                // to iterate all values to not find any. also grab available labels in traversal values
-                if (keyValues[i + 1] instanceof Traversal.Admin) {
-                    final Traversal.Admin t = (Traversal.Admin) keyValues[i + 1];
-                    addTraversal(t);
-                    if (parent != null) parent.integrateChild(t);
+            if (keyValues[ix + 1] != null) {
+
+                // check both key and value for traversal instances. track the list of traversals that are present so
+                // that elsewhere in Parameters there is no need to iterate all values to not find any. also grab
+                // available labels in traversal values
+                for (int iy = 0; iy < 2; iy++) {
+                    if (keyValues[ix + iy] instanceof Traversal.Admin) {
+                        final Traversal.Admin t = (Traversal.Admin) keyValues[ix + iy];
+                        addTraversal(t);
+                        if (parent != null) parent.integrateChild(t);
+                    }
                 }
 
-                List<Object> values = this.parameters.get(keyValues[i]);
+                List<Object> values = this.parameters.get(keyValues[ix]);
                 if (null == values) {
                     values = new ArrayList<>();
-                    values.add(keyValues[i + 1]);
-                    this.parameters.put(keyValues[i], values);
+                    values.add(keyValues[ix + 1]);
+                    this.parameters.put(keyValues[ix], values);
                 } else {
-                    values.add(keyValues[i + 1]);
+                    values.add(keyValues[ix + 1]);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fbfab79/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
index 1956a7e..b9d753b 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
@@ -81,6 +81,11 @@ public abstract class GroovyAddVertexTest {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.withSideEffect('a', 'marko').addV().property('name', select('a')).name")
         }
 
+        @Override
+        public Traversal<Vertex, String> get_g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name() {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.withSideEffect('a', 'name').addV().property(select('a'), 'marko').name")
+        }
+
         ///////// DEPRECATED BELOW
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fbfab79/gremlin-test/features/map/AddVertex.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/AddVertex.feature b/gremlin-test/features/map/AddVertex.feature
index 2813733..996521b 100644
--- a/gremlin-test/features/map/AddVertex.feature
+++ b/gremlin-test/features/map/AddVertex.feature
@@ -308,3 +308,30 @@ Feature: Step - addV()
       | result |
       | m[{"temp": ["test"], "name": ["lop"]}] |
       | m[{"temp": ["test"], "name": ["ripple"]}] |
+
+  Scenario: g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.withSideEffect("a", "name").addV().property(__.select("a"), "marko").values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+    And the graph should return 2 for count of "g.V().has(\"name\",\"marko\")"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fbfab79/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
index d44b439..7cf5e6a 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
@@ -38,10 +38,8 @@ import java.util.Map;
 
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.select;
-import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 /**
@@ -70,6 +68,8 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
 
     public abstract Traversal<Vertex, String> get_g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name();
 
+    public abstract Traversal<Vertex, String> get_g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name();
+
     // 3.0.0 DEPRECATIONS
     @Deprecated
     public abstract Traversal<Vertex, Vertex> get_g_V_addVXlabel_animal_age_0X();
@@ -296,6 +296,17 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
         assertFalse(traversal.hasNext());
     }
 
+    @Test
+    @LoadGraphWith(MODERN)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
+    public void g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name() {
+        final Traversal<Vertex, String> traversal = get_g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name();
+        printTraversalForm(traversal);
+        assertEquals("marko", traversal.next());
+        assertFalse(traversal.hasNext());
+    }
+
 
     public static class Traversals extends AddVertexTest {
 
@@ -358,5 +369,10 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
         public Traversal<Vertex, String> get_g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name() {
             return g.withSideEffect("a", "marko").addV().property("name", select("a")).values("name");
         }
+
+        @Override
+        public Traversal<Vertex, String> get_g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name() {
+            return g.withSideEffect("a", "name").addV().property(select("a"),"marko").values("name");
+        }
     }
 }
\ No newline at end of file


[5/5] tinkerpop git commit: TINKERPOP-1950 Cached global strategy lookups during traversal construction

Posted by sp...@apache.org.
TINKERPOP-1950 Cached global strategy lookups during traversal construction

This change leads to a 1.5x to 2x speed improvement in traversal construction. It is especially effective when processing traversals that have many child traversals within them as this method is called for not only the parent traversal but all the children as well.


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

Branch: refs/heads/TINKERPOP-1950
Commit: cd20298d3f4ee5f66fe4f037e8aa64daf32254b4
Parents: 44c4073
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Apr 20 16:18:13 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 25 07:41:38 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../process/traversal/TraversalStrategies.java  | 36 +++++++++++++++-----
 2 files changed, 29 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cd20298d/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f71602a..f6ca111 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Bumped to httpclient 4.5.5.
 * Bumped to Groovy 2.4.15 - fixes bug with `Lambda` construction.
 * Improved performance of GraphSON deserialization of `Bytecode`.
+* Improved performance of traversal construction.
 
 [[release-3-2-8]]
 === TinkerPop 3.2.8 (Release Date: April 2, 2018)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cd20298d/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
index c7ee5bf..e84737c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
@@ -52,6 +52,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 
 /**
@@ -198,6 +199,12 @@ public interface TraversalStrategies extends Serializable, Cloneable {
 
     public static final class GlobalCache {
 
+        /**
+         * Keeps track of {@link GraphComputer} and/or {@link Graph} classes that have been initialized to the
+         * classloader so that they do not have to be reflected again.
+         */
+        private static Set<Class> LOADED = ConcurrentHashMap.newKeySet();
+
         private static final Map<Class<? extends Graph>, TraversalStrategies> GRAPH_CACHE = new HashMap<>();
         private static final Map<Class<? extends GraphComputer>, TraversalStrategies> GRAPH_COMPUTER_CACHE = new HashMap<>();
 
@@ -244,20 +251,33 @@ public interface TraversalStrategies extends Serializable, Cloneable {
         public static TraversalStrategies getStrategies(final Class graphOrGraphComputerClass) {
             try {
                 // be sure to load the class so that its static{} traversal strategy registration component is loaded.
-                // this is more important for GraphComputer classes as they are typically not instantiated prior to strategy usage like Graph classes.
-                final String graphComputerClassName = null != graphOrGraphComputerClass.getDeclaringClass() ?
+                // this is more important for GraphComputer classes as they are typically not instantiated prior to
+                // strategy usage like Graph classes.
+                if (!LOADED.contains(graphOrGraphComputerClass)) {
+                    final String graphComputerClassName = null != graphOrGraphComputerClass.getDeclaringClass() ?
                         graphOrGraphComputerClass.getCanonicalName().replace("." + graphOrGraphComputerClass.getSimpleName(), "$" + graphOrGraphComputerClass.getSimpleName()) :
                         graphOrGraphComputerClass.getCanonicalName();
-                Class.forName(graphComputerClassName);
+                    Class.forName(graphComputerClassName);
+
+                    // keep track of stuff we already loaded once - stuff in this if/statement isn't cheap and this
+                    // method gets called a lot, basically every time a new traversal gets spun up (that includes
+                    // child traversals. perhaps it is possible to just check the cache keys for this information, but
+                    // it's not clear if this method will be called with something not in the cache and if it is and
+                    // it results in error, then we'd probably not want to deal with this block again anyway
+                    LOADED.add(graphOrGraphComputerClass);
+                }
             } catch (final ClassNotFoundException e) {
                 throw new IllegalStateException(e.getMessage(), e);
             }
-            if (Graph.class.isAssignableFrom(graphOrGraphComputerClass)) {
-                final TraversalStrategies traversalStrategies = GRAPH_CACHE.get(graphOrGraphComputerClass);
-                return null == traversalStrategies ? GRAPH_CACHE.get(Graph.class) : traversalStrategies;
+            
+            if (GRAPH_CACHE.containsKey(graphOrGraphComputerClass)) {
+                return GRAPH_CACHE.get(graphOrGraphComputerClass);
+            } else if (Graph.class.isAssignableFrom(graphOrGraphComputerClass)) {
+                return GRAPH_CACHE.get(Graph.class);
+            } else if (GRAPH_COMPUTER_CACHE.containsKey(graphOrGraphComputerClass)) {
+                return GRAPH_COMPUTER_CACHE.get(graphOrGraphComputerClass);
             } else if (GraphComputer.class.isAssignableFrom(graphOrGraphComputerClass)) {
-                final TraversalStrategies traversalStrategies = GRAPH_COMPUTER_CACHE.get(graphOrGraphComputerClass);
-                return null == traversalStrategies ? GRAPH_COMPUTER_CACHE.get(GraphComputer.class) : traversalStrategies;
+                return GRAPH_COMPUTER_CACHE.get(GraphComputer.class);
             } else {
                 throw new IllegalArgumentException("The TraversalStrategies.GlobalCache only supports Graph and GraphComputer strategy caching: " + graphOrGraphComputerClass.getCanonicalName());
             }


[2/5] tinkerpop git commit: TINKERPOP-1953 Bump to Groovy 2.4.15

Posted by sp...@apache.org.
TINKERPOP-1953 Bump to Groovy 2.4.15

Fixes a bug in Lambda construction for remote traversals


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

Branch: refs/heads/TINKERPOP-1950
Commit: 40dad27880189ffb8c901a8d7bdcf3d505325693
Parents: 682f298
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 23 09:33:25 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 23 09:33:25 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../upgrade/release-3.2.x-incubating.asciidoc   | 24 ++++++++++++++++++++
 .../jsr223/GremlinGroovyScriptEngineTest.java   |  9 ++++++++
 pom.xml                                         |  2 +-
 4 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/40dad278/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 51c9f68..797072d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 === TinkerPop 3.2.9 (Release Date: NOT OFFICIALLY RELEASED YET)
 
 * Bumped to httpclient 4.5.5.
+* Bumped to Groovy 2.4.15 - fixes bug with `Lambda` construction.
 * Improved performance of GraphSON deserialization of `Bytecode`.
 
 [[release-3-2-8]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/40dad278/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index b57a657..51b85d3 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -21,6 +21,30 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 *Nine Inch Gremlins*
 
+== TinkerPop 3.2.9
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the link:https://github.com/apache/tinkerpop/blob/3.2.8/CHANGELOG.asciidoc#release-3-2-9[changelog] for a complete list of all the modifications that are part of this release.
+
+=== Upgrading for Users
+
+==== Lambda Construction
+
+It was realized quite shortly after release of 3.2.8 that there was a bug in construction of `Lambda` instances:
+
+[source,text]
+----
+gremlin> org.apache.tinkerpop.gremlin.util.function.Lambda.function("{ it.get() }")
+(class: org/apache/tinkerpop/gremlin/util/function/Lambda$function, method: callStatic signature: (Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
+Type ':help' or ':h' for help.
+Display stack trace? [yN]n
+----
+
+The problem was related to a bug in Groovy 2.4.14 and was fixed in 2.4.15.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1953[TINKERPOP-1953]
+
 == TinkerPop 3.2.8
 
 *Release Date: April 2, 2018*

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/40dad278/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
index 0606721..54e997f 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
@@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.groovy.CompilerCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.NoImportCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.InterpreterModeCustomizerProvider;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.util.function.Lambda;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.javatuples.Pair;
 import org.junit.Test;
@@ -603,4 +604,12 @@ public class GremlinGroovyScriptEngineTest {
         assertEquals(1, engine.getClassCacheLoadFailureCount());
         assertEquals(100, engine.getClassCacheLoadSuccessCount());
     }
+
+    @Test
+    public void shouldEvalForLambda() throws Exception {
+        // https://issues.apache.org/jira/browse/TINKERPOP-1953
+        final GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine();
+        final Lambda l = (Lambda) engine.eval(" org.apache.tinkerpop.gremlin.util.function.Lambda.function(\"{ it.get() }\")");
+        assertEquals("{ it.get() }", l.getLambdaScript());
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/40dad278/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5ac2d88..4ec1ab4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -141,7 +141,7 @@ limitations under the License.
         <commons.configuration.version>1.10</commons.configuration.version>
         <commons.lang.version>2.6</commons.lang.version>
         <commons.lang3.version>3.3.1</commons.lang3.version>
-        <groovy.version>2.4.14</groovy.version>
+        <groovy.version>2.4.15</groovy.version>
         <hadoop.version>2.7.2</hadoop.version>
         <java.tuples.version>1.2</java.tuples.version>
         <javadoc-plugin.version>2.10.4</javadoc-plugin.version>


[3/5] tinkerpop git commit: Merge branch 'TINKERPOP-1953' into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1953' into tp32


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

Branch: refs/heads/TINKERPOP-1950
Commit: 42ce7a5e8491e247c617e3872963882357765a33
Parents: 8462f85 40dad27
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Apr 25 06:52:52 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 25 06:52:52 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../upgrade/release-3.2.x-incubating.asciidoc   | 24 ++++++++++++++++++++
 .../jsr223/GremlinGroovyScriptEngineTest.java   |  9 ++++++++
 pom.xml                                         |  2 +-
 4 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[4/5] tinkerpop git commit: Merge branch 'TINKERPOP-1947' into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1947' into tp32


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

Branch: refs/heads/TINKERPOP-1950
Commit: 44c4073f2711cd56948ea9753f94e51897262031
Parents: 42ce7a5 8fbfab7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Apr 25 06:56:17 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 25 06:56:17 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../process/traversal/step/util/Parameters.java | 30 +++++++++++---------
 .../step/map/GroovyAddVertexTest.groovy         |  5 ++++
 gremlin-test/features/map/AddVertex.feature     | 27 ++++++++++++++++++
 .../traversal/step/map/AddVertexTest.java       | 20 +++++++++++--
 5 files changed, 68 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/44c4073f/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 797072d,6f7baa5..f71602a
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -23,9 -23,8 +23,10 @@@ image::https://raw.githubusercontent.co
  [[release-3-2-9]]
  === TinkerPop 3.2.9 (Release Date: NOT OFFICIALLY RELEASED YET)
  
+ * Fixed bug where path history was not being preserved for keys in mutations.
  * Bumped to httpclient 4.5.5.
 +* Bumped to Groovy 2.4.15 - fixes bug with `Lambda` construction.
 +* Improved performance of GraphSON deserialization of `Bytecode`.
  
  [[release-3-2-8]]
  === TinkerPop 3.2.8 (Release Date: April 2, 2018)