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/10/31 17:25:17 UTC

[01/31] tinkerpop git commit: added Pick.none and Pick.any to the CoreImports. Added it to both GraphSONModule and GryoMapper. Added two new test cases which use any and none -- one in ChooseTest and one in BranchTest. Added none/any to GroovyTranslator [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-932 da3e8bb3d -> 5802f1648 (forced update)


added Pick.none and Pick.any to the CoreImports. Added it to both GraphSONModule and GryoMapper. Added two new test cases which use any and none -- one in ChooseTest and one in BranchTest. Added none/any to GroovyTranslator and PythonTranslator. All good in the hood.


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

Branch: refs/heads/TINKERPOP-932
Commit: 0fec46db21a3af0604a85b9b4bed4e47db8d1a70
Parents: 1148e82
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Oct 21 13:07:18 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Oct 21 13:07:18 2016 -0600

----------------------------------------------------------------------
 .../structure/io/graphson/GraphSONModule.java   |  4 +++
 .../gremlin/structure/io/gryo/GryoMapper.java   |  4 ++-
 .../tinkerpop/gremlin/util/CoreImports.java     |  6 +++-
 .../step/branch/GroovyBranchTest.groovy         | 13 ++++++++-
 .../step/branch/GroovyChooseTest.groovy         | 10 +++++++
 .../gremlin/groovy/jsr223/GroovyTranslator.java |  3 ++
 .../gremlin/python/jsr223/PythonTranslator.java |  3 ++
 .../jython/gremlin_python/process/traversal.py  |  4 +++
 .../traversal/step/branch/BranchTest.java       | 29 ++++++++++++++++----
 .../traversal/step/branch/ChooseTest.java       | 19 +++++++++++++
 10 files changed, 87 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
index b361fac..a644d37 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONModule.java
@@ -31,6 +31,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.Tree;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy;
@@ -145,6 +146,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                             Order.values(),
                             Pop.values(),
                             SackFunctions.Barrier.values(),
+                            TraversalOptionParent.Pick.values(),
                             Scope.values(),
                             T.values()).flatMap(Stream::of).forEach(e -> put(e.getClass(), e.getDeclaringClass().getSimpleName()));
                     Arrays.asList(
@@ -215,6 +217,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                     Pop.class,
                     SackFunctions.Barrier.class,
                     Scope.class,
+                    TraversalOptionParent.Pick.class,
                     T.class).forEach(e -> addSerializer(e, new GraphSONTraversalSerializersV2d0.EnumJacksonSerializer()));
             addSerializer(P.class, new GraphSONTraversalSerializersV2d0.PJacksonSerializer());
             addSerializer(Lambda.class, new GraphSONTraversalSerializersV2d0.LambdaJacksonSerializer());
@@ -245,6 +248,7 @@ abstract class GraphSONModule extends TinkerPopJacksonModule {
                     Pop.values(),
                     SackFunctions.Barrier.values(),
                     Scope.values(),
+                    TraversalOptionParent.Pick.values(),
                     T.values()).flatMap(Stream::of).forEach(e -> addDeserializer(e.getClass(), new GraphSONTraversalSerializersV2d0.EnumJacksonDeserializer(e.getDeclaringClass())));
             addDeserializer(P.class, new GraphSONTraversalSerializersV2d0.PJacksonDeserializer());
             addDeserializer(Lambda.class, new GraphSONTraversalSerializersV2d0.LambdaJacksonDeserializer());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
index 0a7d277..fef7288 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
@@ -32,6 +32,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Path;
 import org.apache.tinkerpop.gremlin.process.traversal.Pop;
 import org.apache.tinkerpop.gremlin.process.traversal.SackFunctions;
 import org.apache.tinkerpop.gremlin.process.traversal.Scope;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeGlobalStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.GroupCountStep;
@@ -349,7 +350,8 @@ public final class GryoMapper implements Mapper<Kryo> {
             add(GryoTypeReg.of(Column.class, 132));
             add(GryoTypeReg.of(Pop.class, 133));
             add(GryoTypeReg.of(SackFunctions.Barrier.class, 135));
-            add(GryoTypeReg.of(HashSetSupplier.class, 136, new UtilSerializers.HashSetSupplierSerializer())); // ***LAST ID***
+            add(GryoTypeReg.of(TraversalOptionParent.Pick.class, 137)); // ***LAST ID***
+            add(GryoTypeReg.of(HashSetSupplier.class, 136, new UtilSerializers.HashSetSupplierSerializer()));
 
             add(GryoTypeReg.of(TraverserSet.class, 58));
             add(GryoTypeReg.of(Tree.class, 61));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/CoreImports.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/CoreImports.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/CoreImports.java
index 1c76f0e..e6c64fd 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/CoreImports.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/CoreImports.java
@@ -44,19 +44,20 @@ import org.apache.tinkerpop.gremlin.process.traversal.Translator;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.HaltedTraverserStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ProfileStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy;
@@ -123,6 +124,8 @@ public final class CoreImports {
         CLASS_IMPORTS.add(Pop.class);
         CLASS_IMPORTS.add(Scope.class);
         CLASS_IMPORTS.add(T.class);
+        CLASS_IMPORTS.add(TraversalOptionParent.class);
+        CLASS_IMPORTS.add(TraversalOptionParent.Pick.class);
         CLASS_IMPORTS.add(P.class);
         // remote
         CLASS_IMPORTS.add(RemoteConnection.class);
@@ -203,6 +206,7 @@ public final class CoreImports {
         Collections.addAll(ENUM_IMPORTS, Pop.values());
         Collections.addAll(ENUM_IMPORTS, Scope.values());
         Collections.addAll(ENUM_IMPORTS, T.values());
+        Collections.addAll(ENUM_IMPORTS, TraversalOptionParent.Pick.values());
 
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyBranchTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyBranchTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyBranchTest.groovy
index fe13e1d..e602f4e 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyBranchTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyBranchTest.groovy
@@ -35,7 +35,7 @@ public abstract class GroovyBranchTest {
         }
 
         @Override
-        public Traversal<Vertex, Object> get_g_V_branchXlabelX_optionXperson__ageX_optionXsoftware__langX_optionXsoftware__nameX() {
+        public Traversal<Vertex, Object> get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX() {
             new ScriptTraversal<>(g, "gremlin-groovy", """
             g.V.branch{it.label == 'person' ? 'a' : 'b'}
                     .option('a', __.age)
@@ -43,5 +43,16 @@ public abstract class GroovyBranchTest {
                     .option('b', __.name)
             """)
         }
+
+        @Override
+        public Traversal<Vertex, Object> get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX_optionXany__labelX() {
+            new ScriptTraversal<>(g, "gremlin-groovy", """
+             g.V.branch(label().is("person").count)
+                    .option(1L,__.age)
+                    .option(0L,__.lang)
+                    .option(0L,__.name)
+                    .option(any,label())
+            """)
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
index b92ab9b..99bb31b 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/branch/GroovyChooseTest.groovy
@@ -43,5 +43,15 @@ public abstract class GroovyChooseTest {
         public Traversal<Vertex, String> get_g_V_chooseXhasLabelXpersonX_and_outXcreatedX__outXknowsX__identityX_name() {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.V.choose(hasLabel('person').and().out('created'), out('knows'), identity()).name")
         }
+
+        @Override
+        public Traversal<Vertex, String> get_g_V_chooseXlabelX_optionXblah__outXknowsXX_optionXbleep__outXcreatedXX_optionXnone__identityX_name() {
+            new ScriptTraversal<>(g, "gremlin-groovy", """
+                g.V.choose(label())
+                    .option("blah", out("knows"))
+                    .option("bleep", out("created"))
+                    .option(none, identity()).name
+                """)
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
index 02e49b1..d102037 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyTranslator.java
@@ -27,6 +27,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Translator;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.OrP;
@@ -151,6 +152,8 @@ public final class GroovyTranslator implements Translator.ScriptTranslator {
             return "SackFunctions.Barrier." + object.toString();
         else if (object instanceof VertexProperty.Cardinality)
             return "VertexProperty.Cardinality." + object.toString();
+        else if (object instanceof TraversalOptionParent.Pick)
+            return "TraversalOptionParent.Pick." + object.toString();
         else if (object instanceof Enum)
             return ((Enum) object).getDeclaringClass().getSimpleName() + "." + object.toString();
         else if (object instanceof Element)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/PythonTranslator.java
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/PythonTranslator.java b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/PythonTranslator.java
index bfabbb8..0739c92 100644
--- a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/PythonTranslator.java
+++ b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/PythonTranslator.java
@@ -29,6 +29,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP;
 import org.apache.tinkerpop.gremlin.process.traversal.util.OrP;
@@ -183,6 +184,8 @@ public class PythonTranslator implements Translator.ScriptTranslator {
             return "Cardinality." + SymbolHelper.toPython(object.toString());
         else if (object instanceof SackFunctions.Barrier)
             return "Barrier." + SymbolHelper.toPython(object.toString());
+        else if (object instanceof TraversalOptionParent.Pick)
+            return "Pick." + SymbolHelper.toPython(object.toString());
         else if (object instanceof Enum)
             return convertStatic(((Enum) object).getDeclaringClass().getSimpleName() + ".") + SymbolHelper.toPython(object.toString());
         else if (object instanceof P)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
index a56dd74..d30db35 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
@@ -118,6 +118,10 @@ statics.add_static('keyDecr', Order.keyDecr)
 statics.add_static('valueDecr', Order.valueDecr)
 statics.add_static('shuffle', Order.shuffle)
 
+Pick = Enum('Pick', 'any none')
+statics.add_static('any', Pick.any)
+statics.add_static('none', Pick.none)
+
 Pop = Enum('Pop', 'all_ first last')
 statics.add_static('first', Pop.first)
 statics.add_static('last', Pop.last)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchTest.java
index 049358f..44a63bd 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchTest.java
@@ -22,7 +22,6 @@ import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -32,6 +31,7 @@ import java.util.Arrays;
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.label;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+import static org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent.Pick.any;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -41,7 +41,9 @@ public abstract class BranchTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Object> get_g_V_branchXlabel_eq_person__a_bX_optionXa__ageX_optionXb__langX_optionXb__nameX();
 
-    public abstract Traversal<Vertex, Object> get_g_V_branchXlabelX_optionXperson__ageX_optionXsoftware__langX_optionXsoftware__nameX();
+    public abstract Traversal<Vertex, Object> get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX();
+
+    public abstract Traversal<Vertex, Object> get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX_optionXany__labelX();
 
     @Test
     @LoadGraphWith(MODERN)
@@ -53,12 +55,20 @@ public abstract class BranchTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_branchXlabelX_optionXperson__ageX_optionXsoftware__langX_optionXsoftware__nameX() {
-        final Traversal<Vertex, Object> traversal = get_g_V_branchXlabelX_optionXperson__ageX_optionXsoftware__langX_optionXsoftware__nameX();
+    public void g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX() {
+        final Traversal<Vertex, Object> traversal = get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX();
         printTraversalForm(traversal);
         checkResults(Arrays.asList("java", "java", "lop", "ripple", 29, 27, 32, 35), traversal);
     }
 
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX_optionXany__labelX() {
+        final Traversal<Vertex, Object> traversal = get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX_optionXany__labelX();
+        printTraversalForm(traversal);
+        checkResults(Arrays.asList("java", "java", "lop", "ripple", 29, 27, 32, 35, "person", "person", "person", "person", "software", "software"), traversal);
+    }
+
     public static class Traversals extends BranchTest {
 
         @Override
@@ -70,11 +80,20 @@ public abstract class BranchTest extends AbstractGremlinProcessTest {
         }
 
         @Override
-        public Traversal<Vertex, Object> get_g_V_branchXlabelX_optionXperson__ageX_optionXsoftware__langX_optionXsoftware__nameX() {
+        public Traversal<Vertex, Object> get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX() {
             return g.V().branch(label().is("person").count())
                     .option(1L, values("age"))
                     .option(0L, values("lang"))
                     .option(0L, values("name"));
         }
+
+        @Override
+        public Traversal<Vertex, Object> get_g_V_branchXlabel_isXpersonX_countX_optionX1__ageX_optionX0__langX_optionX0__nameX_optionXany__labelX() {
+            return g.V().branch(label().is("person").count())
+                    .option(1L, values("age"))
+                    .option(0L, values("lang"))
+                    .option(0L, values("name"))
+                    .option(any, label());
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0fec46db/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
index bf050e4..ce12daf 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/ChooseTest.java
@@ -22,6 +22,7 @@ import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.MapHelper;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
@@ -35,6 +36,7 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.identity;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.in;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.label;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.valueMap;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
@@ -54,6 +56,7 @@ public abstract class ChooseTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, String> get_g_V_chooseXhasLabelXpersonX_and_outXcreatedX__outXknowsX__identityX_name();
 
+    public abstract Traversal<Vertex, String> get_g_V_chooseXlabelX_optionXblah__outXknowsXX_optionXbleep__outXcreatedXX_optionXnone__identityX_name();
 
     @Test
     @LoadGraphWith(MODERN)
@@ -89,6 +92,14 @@ public abstract class ChooseTest extends AbstractGremlinProcessTest {
         checkResults(Arrays.asList("lop", "ripple", "josh", "vadas", "vadas"), traversal);
     }
 
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_chooseXlabelX_optionXblah__outXknowsXX_optionXbleep__outXcreatedXX_optionXnone__identityX_name() {
+        final Traversal<Vertex, String> traversal = get_g_V_chooseXlabelX_optionXblah__outXknowsXX_optionXbleep__outXcreatedXX_optionXnone__identityX_name();
+        printTraversalForm(traversal);
+        checkResults(Arrays.asList("marko", "vadas", "peter", "josh", "lop", "ripple"), traversal);
+    }
+
     public static class Traversals extends ChooseTest {
 
         @Override
@@ -107,5 +118,13 @@ public abstract class ChooseTest extends AbstractGremlinProcessTest {
         public Traversal<Vertex, String> get_g_V_chooseXhasLabelXpersonX_and_outXcreatedX__outXknowsX__identityX_name() {
             return g.V().choose(hasLabel("person").and().out("created"), out("knows"), identity()).values("name");
         }
+
+        @Override
+        public Traversal<Vertex, String> get_g_V_chooseXlabelX_optionXblah__outXknowsXX_optionXbleep__outXcreatedXX_optionXnone__identityX_name() {
+            return g.V().choose(label())
+                    .option("blah", out("knows"))
+                    .option("bleep", out("created"))
+                    .option(TraversalOptionParent.Pick.none, identity()).values("name");
+        }
     }
 }
\ No newline at end of file


[15/31] tinkerpop git commit: Merge branch 'tp31' into tp32

Posted by sp...@apache.org.
Merge branch 'tp31' into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: 16c7c2449d45a6090e036a2b62244db75244adae
Parents: 2d9bb20 781ff3a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 26 09:33:49 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 26 09:33:49 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                     |  1 +
 .../tinkerpop/gremlin/FeatureRequirementSet.java       |  2 +-
 .../apache/tinkerpop/gremlin/structure/EdgeTest.java   | 13 ++++---------
 3 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/16c7c244/CHANGELOG.asciidoc
----------------------------------------------------------------------


[22/31] tinkerpop git commit: Lazy message scope initialization in PeerPressureVertexProgram. Remove vertex id checks in BulkDumperVertexProgramTest. Don't rollback transaction if already closed in TransactionTest.

Posted by sp...@apache.org.
Lazy message scope initialization in PeerPressureVertexProgram. Remove vertex id checks in BulkDumperVertexProgramTest. Don't rollback transaction if already closed in TransactionTest.


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

Branch: refs/heads/TINKERPOP-932
Commit: 7aa9782c40300531bf08bd140897b50bcd0acdd1
Parents: 5a16f4c
Author: sjudeng <sj...@users.noreply.github.com>
Authored: Wed Oct 26 16:48:23 2016 -0500
Committer: sjudeng <sj...@users.noreply.github.com>
Committed: Wed Oct 26 16:48:23 2016 -0500

----------------------------------------------------------------------
 .../clustering/peerpressure/PeerPressureVertexProgram.java     | 4 ++--
 .../computer/bulkdumping/BulkDumperVertexProgramTest.java      | 6 ------
 .../apache/tinkerpop/gremlin/structure/TransactionTest.java    | 2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7aa9782c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/peerpressure/PeerPressureVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/peerpressure/PeerPressureVertexProgram.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/peerpressure/PeerPressureVertexProgram.java
index 56de255..b681807 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/peerpressure/PeerPressureVertexProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/clustering/peerpressure/PeerPressureVertexProgram.java
@@ -58,8 +58,6 @@ public class PeerPressureVertexProgram extends StaticVertexProgram<Pair<Serializ
 
     private MessageScope.Local<?> voteScope = MessageScope.Local.of(__::outE);
     private MessageScope.Local<?> countScope = MessageScope.Local.of(new MessageScope.Local.ReverseTraversalSupplier(this.voteScope));
-    private final Set<MessageScope> VOTE_SCOPE = new HashSet<>(Collections.singletonList(this.voteScope));
-    private final Set<MessageScope> COUNT_SCOPE = new HashSet<>(Collections.singletonList(this.countScope));
 
     public static final String CLUSTER = "gremlin.peerPressureVertexProgram.cluster";
     private static final String VOTE_STRENGTH = "gremlin.peerPressureVertexProgram.voteStrength";
@@ -120,6 +118,8 @@ public class PeerPressureVertexProgram extends StaticVertexProgram<Pair<Serializ
 
     @Override
     public Set<MessageScope> getMessageScopes(final Memory memory) {
+        final Set<MessageScope> VOTE_SCOPE = new HashSet<>(Collections.singletonList(this.voteScope));
+        final Set<MessageScope> COUNT_SCOPE = new HashSet<>(Collections.singletonList(this.countScope));
         return this.distributeVote && memory.isInitialIteration() ? COUNT_SCOPE : VOTE_SCOPE;
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7aa9782c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkdumping/BulkDumperVertexProgramTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkdumping/BulkDumperVertexProgramTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkdumping/BulkDumperVertexProgramTest.java
index c55114e..62104c0 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkdumping/BulkDumperVertexProgramTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkdumping/BulkDumperVertexProgramTest.java
@@ -48,7 +48,6 @@ public class BulkDumperVertexProgramTest extends AbstractGremlinProcessTest {
                 assertEquals(1, IteratorUtils.count(v.values("age", "lang")));
                 final String name = v.value("name");
                 if (name.equals("marko")) {
-                    assertEquals(1, v.id());
                     assertEquals("person", v.label());
                     assertEquals(Integer.valueOf(29), v.value("age"));
                     assertEquals(3, IteratorUtils.count(v.edges(Direction.OUT)));
@@ -56,21 +55,18 @@ public class BulkDumperVertexProgramTest extends AbstractGremlinProcessTest {
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.OUT, "created")));
                     assertEquals(0, IteratorUtils.count(v.edges(Direction.IN)));
                 } else if (name.equals("vadas")) {
-                    assertEquals(2, v.id());
                     assertEquals("person", v.label());
                     assertEquals(Integer.valueOf(27), v.value("age"));
                     assertEquals(0, IteratorUtils.count(v.edges(Direction.OUT)));
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.IN)));
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.IN, "knows")));
                 } else if (name.equals("lop")) {
-                    assertEquals(3, v.id());
                     assertEquals("software", v.label());
                     assertEquals("java", v.value("lang"));
                     assertEquals(0, IteratorUtils.count(v.edges(Direction.OUT)));
                     assertEquals(3, IteratorUtils.count(v.edges(Direction.IN)));
                     assertEquals(3, IteratorUtils.count(v.edges(Direction.IN, "created")));
                 } else if (name.equals("josh")) {
-                    assertEquals(4, v.id());
                     assertEquals("person", v.label());
                     assertEquals(Integer.valueOf(32), v.value("age"));
                     assertEquals(2, IteratorUtils.count(v.edges(Direction.OUT)));
@@ -78,14 +74,12 @@ public class BulkDumperVertexProgramTest extends AbstractGremlinProcessTest {
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.IN)));
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.IN, "knows")));
                 } else if (name.equals("ripple")) {
-                    assertEquals(5, v.id());
                     assertEquals("software", v.label());
                     assertEquals("java", v.value("lang"));
                     assertEquals(0, IteratorUtils.count(v.edges(Direction.OUT)));
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.IN)));
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.IN, "created")));
                 } else if (name.equals("peter")) {
-                    assertEquals(6, v.id());
                     assertEquals("person", v.label());
                     assertEquals(Integer.valueOf(35), v.value("age"));
                     assertEquals(1, IteratorUtils.count(v.edges(Direction.OUT)));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7aa9782c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
index 2b953ab..4dbbc5f 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
@@ -648,7 +648,7 @@ public class TransactionTest extends AbstractGremlinTest {
         } catch (Exception ex) {
             assertThat(ex, instanceOf(IllegalStateException.class));
         } finally {
-            threadedG.tx().rollback();
+            if (threadedG.tx().isOpen()) threadedG.tx().rollback();
         }
     }
 


[25/31] tinkerpop git commit: Merge branch 'TINKERPOP-919' into tp32

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


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

Branch: refs/heads/TINKERPOP-932
Commit: c4682f172f04a9e38b69a9c9a9829ebc7caf3cad
Parents: 630c1ff 3a7805c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Oct 28 18:26:00 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Oct 28 18:26:00 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  8 ++++++
 .../tinkerpop/gremlin/structure/Graph.java      | 12 +++++++++
 .../gremlin/structure/VertexProperty.java       |  4 +++
 .../gremlin/structure/FeatureSupportTest.java   | 27 ++++++++++++++++++--
 .../gremlin/structure/VertexPropertyTest.java   | 26 ++++++++++++++++---
 6 files changed, 73 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c4682f17/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 88fcde2,1df17de..48f08ef
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,8 -26,8 +26,9 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
+ * Added `VertexFeatures.supportsDuplicateMultiProperties()` for graphs that only support unique values in multi-properties.
  * Deprecated the "performance" tests in `OptIn`.
 +* Added `Pick.none` and `Pick.any` to the serializers and importers.
  * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
  
  [[release-3-2-3]]


[14/31] tinkerpop git commit: Fixed test requirements in EdgeTest CTR

Posted by sp...@apache.org.
Fixed test requirements in EdgeTest CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: 781ff3a06907d6ebcfa54ab2985449c764474226
Parents: 1f84ad3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 26 09:33:06 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 26 09:33:06 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                     |  1 +
 .../tinkerpop/gremlin/FeatureRequirementSet.java       |  2 +-
 .../apache/tinkerpop/gremlin/structure/EdgeTest.java   | 13 ++++---------
 3 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/781ff3a0/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 551a2be..0dafd1c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Minor fixes to various test feature requirements in `gremlin-test`.
 
 [[release-3-1-5]]
 TinkerPop 3.1.5 (Release Date: October 17, 2016)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/781ff3a0/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
index 3941584..6b0e2f2 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/FeatureRequirementSet.java
@@ -56,7 +56,7 @@ public @interface FeatureRequirementSet {
             add(FeatureRequirement.Factory.create(Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES, Graph.Features.EdgeFeatures.class));
             add(FeatureRequirement.Factory.create(Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY, Graph.Features.VertexFeatures.class));
             add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.VertexPropertyFeatures.class));
-            add(FeatureRequirement.Factory.create(Graph.Features.VertexPropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.EdgePropertyFeatures.class));
+            add(FeatureRequirement.Factory.create(Graph.Features.EdgePropertyFeatures.FEATURE_STRING_VALUES, Graph.Features.EdgePropertyFeatures.class));
             add(FeatureRequirement.Factory.create(Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY, Graph.Features.EdgeFeatures.class));
         }};
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/781ff3a0/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
index 320afb4..b7c521d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.structure;
 import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
 import org.apache.tinkerpop.gremlin.ExceptionCoverage;
 import org.apache.tinkerpop.gremlin.FeatureRequirement;
+import org.apache.tinkerpop.gremlin.FeatureRequirementSet;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.junit.Test;
@@ -214,11 +215,7 @@ public class EdgeTest {
         }
 
         @Test
-        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
-        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_REMOVE_PROPERTY)
-        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-        @FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+        @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
         public void shouldGetPropertyKeysOnEdge() {
             final Vertex v = graph.addVertex();
             final Edge e = v.addEdge("friend", v, "name", "marko", "location", "desert", "status", "dope");
@@ -272,10 +269,8 @@ public class EdgeTest {
         }
 
         @Test
-        @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)
-        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
+        @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
+        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
         @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_REMOVE_EDGES)
         public void shouldNotHaveAConcurrentModificationExceptionWhenIteratingAndRemovingAddingEdges() {
             final Vertex v1 = graph.addVertex("name", "marko");


[19/31] tinkerpop git commit: Fixed recommendation image to get gremlin completely in the cart CTR

Posted by sp...@apache.org.
Fixed recommendation image to get gremlin completely in the cart CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: 84973f3c9813fe639d74eaaf6beb3615bf96e34e
Parents: 5f49561
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 26 11:54:24 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 26 11:54:24 2016 -0400

----------------------------------------------------------------------
 docs/static/images/gremlin-recommendation.png | Bin 61405 -> 61024 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/84973f3c/docs/static/images/gremlin-recommendation.png
----------------------------------------------------------------------
diff --git a/docs/static/images/gremlin-recommendation.png b/docs/static/images/gremlin-recommendation.png
index 32507a9..6ac8898 100755
Binary files a/docs/static/images/gremlin-recommendation.png and b/docs/static/images/gremlin-recommendation.png differ


[11/31] tinkerpop git commit: added authorship to TraversalStrategies java file.

Posted by sp...@apache.org.
added authorship to TraversalStrategies java file.


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

Branch: refs/heads/TINKERPOP-932
Commit: b0bedf6b441edddbfd2e005641fee0a044b3b552
Parents: f9bf044
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 25 13:07:01 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 25 13:07:01 2016 -0600

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0bedf6b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
index 3d320db..bb58a06 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
@@ -52,6 +52,7 @@ import static org.junit.Assert.fail;
 
 /**
  * @author Matthias Broecheler (me@matthiasb.com)
+ * @author Marko A. Rodriguez (marko@markorodriguez.com)
  */
 public class TraversalStrategiesTest {
 


[28/31] tinkerpop git commit: reexposed GroovyPeerPressure

Posted by sp...@apache.org.
reexposed GroovyPeerPressure


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

Branch: refs/heads/TINKERPOP-932
Commit: 7c1ee367c9e627c3a1d028a06283b2c5873358d7
Parents: 8ae1a09
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Oct 29 15:16:04 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Oct 29 15:16:04 2016 -0600

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/GroovyProcessComputerSuite.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7c1ee367/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
index f3918b6..e411c1e 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
@@ -148,7 +148,7 @@ public class GroovyProcessComputerSuite extends ProcessComputerSuite {
             GroovyOrderTest.Traversals.class,
             GroovyPageRankTest.Traversals.class,
             GroovyPathTest.Traversals.class,
-            // GroovyPeerPressureTest.Traversals.class, (ordering of ids in multi-threaded environments is non-deterministic)
+            GroovyPeerPressureTest.Traversals.class,
             GroovyProfileTest.Traversals.class,
             GroovyProjectTest.Traversals.class,
             GroovyProgramTest.Traversals.class,


[12/31] tinkerpop git commit: Deprecated OptIn "performance" tests

Posted by sp...@apache.org.
Deprecated OptIn "performance" tests

This should have been done a long time ago on 3.2.1, but it was missed CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: 2d9bb2047271ccf453c6aedbf756322fe87f535e
Parents: 285ff35
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 25 16:13:51 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Oct 25 16:13:51 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                  |  1 +
 docs/src/upgrade/release-3.2.x-incubating.asciidoc  | 16 ++++++++++++++++
 .../apache/tinkerpop/gremlin/structure/Graph.java   | 15 +++++++++++++++
 3 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d9bb204/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a281c38..73bfa1e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Deprecated the "performance" tests in `OptIn`.
 * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
 
 [[release-3-2-3]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d9bb204/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 3ed46b2..0fba8f5 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -29,6 +29,22 @@ TinkerPop 3.2.4
 
 Please see the link:https://github.com/apache/tinkerpop/blob/3.2.4/CHANGELOG.asciidoc#release-3-2-4[changelog] for a complete list of all the modifications that are part of this release.
 
+Upgrading for Providers
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Graph Database Providers
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Deprecated Performance OptIn
+++++++++++++++++++++++++++++
+
+In 3.2.1, all `junit-benchmark` performance tests were deprecated. At that time, the `OptIn` representations of these
+tests should have been deprecated as well, but they were not. That omission has been remedied now. Specifically, the
+following fields were deprecated:
+
+* `OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE`
+* `OptIn.SUITE_PROCESS_PERFORMANCE`
+* `OptIn.SUITE_STRUCTURE_PERFORMANCE`
 
 TinkerPop 3.2.3
 ---------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d9bb204/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index 01379f4..ed3f12d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -1200,14 +1200,29 @@ public interface Graph extends AutoCloseable, Host {
     public @interface OptIn {
         public static String SUITE_STRUCTURE_STANDARD = "org.apache.tinkerpop.gremlin.structure.StructureStandardSuite";
         public static String SUITE_STRUCTURE_INTEGRATE = "org.apache.tinkerpop.gremlin.structure.StructureIntegrateSuite";
+
+        /**
+         * @deprecated As of release 3.2.4, effectively replaced by the gremlin-benchmarks module.
+         */
+        @Deprecated
         public static String SUITE_STRUCTURE_PERFORMANCE = "org.apache.tinkerpop.gremlin.structure.StructurePerformanceSuite";
         public static String SUITE_PROCESS_COMPUTER = "org.apache.tinkerpop.gremlin.process.ProcessComputerSuite";
         public static String SUITE_PROCESS_STANDARD = "org.apache.tinkerpop.gremlin.process.ProcessStandardSuite";
+
+        /**
+         * @deprecated As of release 3.2.4, effectively replaced by the gremlin-benchmarks module.
+         */
+        @Deprecated
         public static String SUITE_PROCESS_PERFORMANCE = "org.apache.tinkerpop.gremlin.process.ProcessPerformanceSuite";
         public static String SUITE_GROOVY_PROCESS_STANDARD = "org.apache.tinkerpop.gremlin.process.GroovyProcessStandardSuite";
         public static String SUITE_GROOVY_PROCESS_COMPUTER = "org.apache.tinkerpop.gremlin.process.GroovyProcessComputerSuite";
         public static String SUITE_GROOVY_ENVIRONMENT = "org.apache.tinkerpop.gremlin.groovy.GroovyEnvironmentSuite";
         public static String SUITE_GROOVY_ENVIRONMENT_INTEGRATE = "org.apache.tinkerpop.gremlin.groovy.GroovyEnvironmentIntegrateSuite";
+
+        /**
+         * @deprecated As of release 3.2.4, effectively replaced by the gremlin-benchmarks module.
+         */
+        @Deprecated
         public static String SUITE_GROOVY_ENVIRONMENT_PERFORMANCE = "org.apache.tinkerpop.gremlin.groovy.GroovyEnvironmentPerformanceSuite";
 
         /**


[04/31] tinkerpop git commit: added Pick to the io graphson.asciidoc docs. updated CHANGELOG.

Posted by sp...@apache.org.
added Pick to the io graphson.asciidoc docs. updated CHANGELOG.


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

Branch: refs/heads/TINKERPOP-932
Commit: 2817c01c1ea1a8fdb17c8f3bd8a9149585926b0d
Parents: fc6ce29
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 25 06:08:00 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 25 06:08:00 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                | 1 +
 docs/src/dev/io/graphson.asciidoc | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2817c01c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4dee4c2..d2cd065 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added `Pick.none` and `Pick.any` to the serializers and importers.
 * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
 
 [[release-3-2-3]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2817c01c/docs/src/dev/io/graphson.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/io/graphson.asciidoc b/docs/src/dev/io/graphson.asciidoc
index 511a0fc..5858b95 100644
--- a/docs/src/dev/io/graphson.asciidoc
+++ b/docs/src/dev/io/graphson.asciidoc
@@ -149,6 +149,7 @@ file.withWriter { writer ->
   writer.write(toJson(Operator.sum, "Operator"))
   writer.write(toJson(Order.incr, "Order"))
   writer.write(toJson(Pop.all, "Pop"))
+  writer.write(toJson(Pick.any, "Pick"))
   writer.write(toJson(org.apache.tinkerpop.gremlin.util.function.Lambda.function("{ it.get() }"), "Lambda"))
   tm = g.V().hasLabel('person').out().out().tree().profile().next()
   metrics = new org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics(tm.getMetrics(0));


[20/31] tinkerpop git commit: Added deprecated annotation to tryRandomCommit()

Posted by sp...@apache.org.
Added deprecated annotation to tryRandomCommit()

Strangely this method was deprecated back in 3.1.1, but the annotation was not added (just the javadoc). CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: bfda5508a1673d4c65b9bb5c9d67b8b83ed349c1
Parents: 781ff3a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 26 14:30:59 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 26 14:30:59 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                                  | 1 +
 .../main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bfda5508/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0dafd1c..52ae70d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Deprecated `tryRandomCommit()` in `AbstractGremlinTest` - the annotation was never added in 3.1.1, and was only deprecated via javadoc.
 * Minor fixes to various test feature requirements in `gremlin-test`.
 
 [[release-3-1-5]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bfda5508/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
index 2a97cd0..a1a6d5b 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
@@ -209,6 +209,7 @@ public abstract class AbstractGremlinTest {
      *
      * @deprecated as of 3.1.1-incubating, and is not replaced
      */
+    @Deprecated
     public void tryRandomCommit(final Graph graph) {
         if (graph.features().graph().supportsTransactions() && new Random().nextBoolean())
             graph.tx().commit();


[16/31] tinkerpop git commit: Merge branch 'TINKERPOP-1507' of https://github.com/apache/tinkerpop into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1507' of https://github.com/apache/tinkerpop into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: ea8cd65ca933b36cbe3d47352d73d96ded3a7ad4
Parents: 16c7c24 2817c01
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Oct 26 08:12:02 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Oct 26 08:12:02 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/dev/io/graphson.asciidoc               |  1 +
 .../structure/io/graphson/GraphSONModule.java   |  4 +++
 .../gremlin/structure/io/gryo/GryoMapper.java   |  4 ++-
 .../tinkerpop/gremlin/util/CoreImports.java     |  6 +++-
 .../step/branch/GroovyBranchTest.groovy         | 13 ++++++++-
 .../step/branch/GroovyChooseTest.groovy         | 10 +++++++
 .../gremlin/groovy/jsr223/GroovyTranslator.java |  3 ++
 .../gremlin/python/jsr223/PythonTranslator.java |  3 ++
 .../jython/gremlin_python/process/traversal.py  |  4 +++
 .../traversal/step/branch/BranchTest.java       | 29 ++++++++++++++++----
 .../traversal/step/branch/ChooseTest.java       | 19 +++++++++++++
 12 files changed, 89 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ea8cd65c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index dc8da2e,d2cd065..74bfcef
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,7 -26,7 +26,8 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 +* Deprecated the "performance" tests in `OptIn`.
+ * Added `Pick.none` and `Pick.any` to the serializers and importers.
  * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
  
  [[release-3-2-3]]


[10/31] tinkerpop git commit: TraversalStrategy.GlobalCache.getStrategies() is now the point where static{} code blocks are loaded for Graph and GraphComputer classes. Added a test case to TraversalStrategiesTset that demonstrates that the GlobalCache ca

Posted by sp...@apache.org.
TraversalStrategy.GlobalCache.getStrategies() is now the point where static{} code blocks are loaded for Graph and GraphComputer classes. Added a test case to TraversalStrategiesTset that demonstrates that the GlobalCache can be manipulated without fear of static{} re-registering strategies. This is a much much safer model and, moreover, proved correct via testing.


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

Branch: refs/heads/TINKERPOP-932
Commit: f9bf0444e4bfe09dcea9b8dc05870ddaec4b6180
Parents: 285ff35
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 25 13:02:29 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 25 13:02:29 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 .../decoration/VertexProgramStrategy.java       |   5 -
 .../process/traversal/TraversalStrategies.java  |  11 +-
 .../process/TraversalStrategiesTest.java        | 194 ++++++++++++++++++-
 4 files changed, 200 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f9bf0444/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a281c38..1c7441b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added a class loader to `TraversalStrategies.GlobalCache` which guarantees strategies are registered prior to `GlobalCache.getStrategies()`.
 * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
 
 [[release-3-2-3]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f9bf0444/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
index 0eeae3c..89e40cb 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
@@ -171,11 +171,6 @@ public final class VertexProgramStrategy extends AbstractTraversalStrategy<Trave
             }
         } else
             graphComputerClass = this.computer.getGraphComputerClass();
-        try {
-            Class.forName(graphComputerClass.getCanonicalName());
-        } catch (final ClassNotFoundException e) {
-            throw new IllegalStateException(e.getMessage(), e);
-        }
         final List<TraversalStrategy<?>> graphComputerStrategies = TraversalStrategies.GlobalCache.getStrategies(graphComputerClass).toList();
         traversalSource.getStrategies().addStrategies(graphComputerStrategies.toArray(new TraversalStrategy[graphComputerStrategies.size()]));
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f9bf0444/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 c271a37..015df70 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
@@ -225,7 +225,6 @@ public interface TraversalStrategies extends Serializable, Cloneable {
                     OrderLimitStrategy.instance(),
                     PathProcessorStrategy.instance(),
                     ComputerVerificationStrategy.instance());
-
             GRAPH_COMPUTER_CACHE.put(GraphComputer.class, graphComputerStrategies);
         }
 
@@ -239,6 +238,16 @@ 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() ?
+                        graphOrGraphComputerClass.getCanonicalName().replace("." + graphOrGraphComputerClass.getSimpleName(), "$" + graphOrGraphComputerClass.getSimpleName()) :
+                        graphOrGraphComputerClass.getCanonicalName();
+                Class.forName(graphComputerClassName);
+            } 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;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f9bf0444/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
index f316836..3d320db 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/TraversalStrategiesTest.java
@@ -18,26 +18,211 @@
  */
 package org.apache.tinkerpop.gremlin.process;
 
+import org.apache.commons.configuration.BaseConfiguration;
+import org.apache.commons.configuration.Configuration;
+import org.apache.tinkerpop.gremlin.process.computer.ComputerResult;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.MapReduce;
+import org.apache.tinkerpop.gremlin.process.computer.VertexProgram;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Transaction;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
 
-import java.util.Arrays;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /**
  * @author Matthias Broecheler (me@matthiasb.com)
  */
 public class TraversalStrategiesTest {
 
+    @Test
+    public void shouldAllowUserManipulationOfGlobalCache() throws Exception {
+        ///////////
+        // GRAPH //
+        ///////////
+        TestGraph graph = new TestGraph();
+        TraversalStrategies strategies = graph.traversal().getStrategies();
+        assertFalse(TraversalStrategies.GlobalCache.getStrategies(Graph.class).toList().isEmpty());
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(Graph.class).toList()) {
+            assertTrue(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(TestGraphComputer.class).toList()) {
+            assertFalse(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        assertTrue(strategies.getStrategy(StrategyA.class).isPresent());
+        assertTrue(strategies.getStrategy(StrategyB.class).isPresent());
+        assertFalse(strategies.getStrategy(StrategyC.class).isPresent());
+        assertFalse(strategies.getStrategy(StrategyD.class).isPresent());
+        strategies.addStrategies(new StrategyD());
+        strategies.removeStrategies(StrategyA.class);
+        assertFalse(strategies.getStrategy(StrategyA.class).isPresent());
+        assertTrue(strategies.getStrategy(StrategyD.class).isPresent());
+        ///
+        graph = new TestGraph();
+        strategies = graph.traversal().getStrategies();
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(Graph.class).toList()) {
+            assertTrue(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(TestGraphComputer.class).toList()) {
+            assertFalse(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        assertFalse(strategies.getStrategy(StrategyA.class).isPresent());
+        assertTrue(strategies.getStrategy(StrategyB.class).isPresent());
+        assertFalse(strategies.getStrategy(StrategyC.class).isPresent());
+        assertTrue(strategies.getStrategy(StrategyD.class).isPresent());
+        //////////////////////
+        /// GRAPH COMPUTER ///
+        //////////////////////
+        strategies = TraversalStrategies.GlobalCache.getStrategies(TestGraphComputer.class);
+        assertFalse(TraversalStrategies.GlobalCache.getStrategies(GraphComputer.class).toList().isEmpty());
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(GraphComputer.class).toList()) {
+            assertTrue(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(TestGraph.class).toList()) {
+            assertFalse(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        assertFalse(strategies.getStrategy(StrategyA.class).isPresent());
+        assertFalse(strategies.getStrategy(StrategyB.class).isPresent());
+        assertTrue(strategies.getStrategy(StrategyC.class).isPresent());
+        strategies.addStrategies(new StrategyE());
+        strategies.removeStrategies(StrategyC.class);
+        //
+        strategies = TraversalStrategies.GlobalCache.getStrategies(TestGraphComputer.class);
+        assertFalse(TraversalStrategies.GlobalCache.getStrategies(GraphComputer.class).toList().isEmpty());
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(GraphComputer.class).toList()) {
+            assertTrue(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        for (final TraversalStrategy strategy : TraversalStrategies.GlobalCache.getStrategies(TestGraph.class).toList()) {
+            assertFalse(strategies.getStrategy(strategy.getClass()).isPresent());
+        }
+        assertFalse(strategies.getStrategy(StrategyA.class).isPresent());
+        assertFalse(strategies.getStrategy(StrategyB.class).isPresent());
+        assertFalse(strategies.getStrategy(StrategyC.class).isPresent());
+        assertFalse(strategies.getStrategy(StrategyD.class).isPresent());
+        assertTrue(strategies.getStrategy(StrategyE.class).isPresent());
+    }
+
+    public static class TestGraphComputer implements GraphComputer {
+
+        static {
+            TraversalStrategies.GlobalCache.registerStrategies(TestGraphComputer.class,
+                    TraversalStrategies.GlobalCache.getStrategies(GraphComputer.class).clone().addStrategies(new StrategyC()));
+        }
+
+        @Override
+        public GraphComputer result(ResultGraph resultGraph) {
+            return this;
+        }
+
+        @Override
+        public GraphComputer persist(Persist persist) {
+            return this;
+        }
+
+        @Override
+        public GraphComputer program(VertexProgram vertexProgram) {
+            return this;
+        }
+
+        @Override
+        public GraphComputer mapReduce(MapReduce mapReduce) {
+            return this;
+        }
+
+        @Override
+        public GraphComputer workers(int workers) {
+            return this;
+        }
+
+        @Override
+        public GraphComputer vertices(Traversal<Vertex, Vertex> vertexFilter) throws IllegalArgumentException {
+            return this;
+        }
+
+        @Override
+        public GraphComputer edges(Traversal<Vertex, Edge> edgeFilter) throws IllegalArgumentException {
+            return this;
+        }
+
+        @Override
+        public Future<ComputerResult> submit() {
+            return new CompletableFuture<>();
+        }
+    }
+
+    public static class TestGraph implements Graph {
+
+        static {
+            TraversalStrategies.GlobalCache.registerStrategies(TestGraph.class,
+                    TraversalStrategies.GlobalCache.getStrategies(Graph.class).clone().addStrategies(new StrategyA(), new StrategyB()));
+        }
+
+        @Override
+        public Vertex addVertex(Object... keyValues) {
+            return null;
+        }
+
+        @Override
+        public <C extends GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException {
+            return (C) new TestGraphComputer();
+        }
+
+        @Override
+        public GraphComputer compute() throws IllegalArgumentException {
+            return new TestGraphComputer();
+        }
+
+        @Override
+        public Iterator<Vertex> vertices(Object... vertexIds) {
+            return Collections.emptyIterator();
+        }
+
+        @Override
+        public Iterator<Edge> edges(Object... edgeIds) {
+            return Collections.emptyIterator();
+        }
+
+        @Override
+        public Transaction tx() {
+            return null;
+        }
+
+        @Override
+        public void close() throws Exception {
+
+        }
+
+        @Override
+        public Variables variables() {
+            return null;
+        }
+
+        @Override
+        public Configuration configuration() {
+            return new BaseConfiguration();
+        }
+    }
+
     /**
      * Tests that {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies#sortStrategies(java.util.List)}
      * works as advertised. This class defines a bunch of dummy strategies which define an order. It is verified
@@ -113,7 +298,7 @@ public class TraversalStrategiesTest {
         assertTrue(s.indexOf(a) < s.indexOf(b));
 
         // sort and then add more
-        s = new ArrayList<>((List)Arrays.asList(b,a,c));
+        s = new ArrayList<>((List) Arrays.asList(b, a, c));
         s = TraversalStrategies.sortStrategies(s);
         assertEquals(3, s.size());
         assertEquals(a, s.get(0));
@@ -220,7 +405,6 @@ public class TraversalStrategiesTest {
     }
 
 
-
     private static class DummyStrategy<S extends TraversalStrategy> extends AbstractTraversalStrategy<S> {
 
         @Override
@@ -262,7 +446,7 @@ public class TraversalStrategiesTest {
         assertEquals(e, s.get(3));
 
         //full reverse sorting
-        s = Arrays.asList(k,e,d,c,b,a);
+        s = Arrays.asList(k, e, d, c, b, a);
         s = TraversalStrategies.sortStrategies(s);
         assertEquals(6, s.size());
         assertEquals(a, s.get(0));


[29/31] tinkerpop git commit: Merge branch 'TINKERPOP-1525-tp32' of https://github.com/dalaro/incubator-tinkerpop into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1525-tp32' of https://github.com/dalaro/incubator-tinkerpop into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: d8eaf20822952908037220b6659f9d801e873c73
Parents: 7c1ee36 36e1159
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Oct 29 15:17:11 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Oct 29 15:17:11 2016 -0600

----------------------------------------------------------------------
 .../gremlin/spark/process/computer/SparkExecutor.java          | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------



[24/31] tinkerpop git commit: Merge branch 'tp31' into tp32

Posted by sp...@apache.org.
Merge branch 'tp31' into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: 630c1ff0e341937808a07a3ad77f3d656021e706
Parents: 5a16f4c 30c2600
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Oct 28 12:01:31 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Oct 28 12:01:31 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                              | 1 +
 .../java/org/apache/tinkerpop/gremlin/server/GremlinServer.java | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/630c1ff0/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/630c1ff0/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
----------------------------------------------------------------------


[03/31] tinkerpop git commit: Merge branch 'tp32' into TINKERPOP-1507

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


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

Branch: refs/heads/TINKERPOP-932
Commit: fc6ce2917b5850e3538acd098030371a21e4a441
Parents: 0fec46d b262c7e
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Oct 25 06:05:25 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Oct 25 06:05:25 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                |  4 ++--
 docs/src/dev/developer/release.asciidoc           |  4 ++++
 docs/src/reference/the-traversal.asciidoc         |  4 ++--
 .../decoration/VertexProgramStrategy.java         |  5 +++++
 .../server/GremlinServerIntegrateTest.java        | 18 ------------------
 5 files changed, 13 insertions(+), 22 deletions(-)
----------------------------------------------------------------------



[05/31] tinkerpop git commit: CTR: Fixed a minor script bug that popped up in the latest release process.

Posted by sp...@apache.org.
CTR: Fixed a minor script bug that popped up in the latest release process.


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

Branch: refs/heads/TINKERPOP-932
Commit: 157dc3f784b3f798947bafaa214b87cc6c8e3ae3
Parents: 52ae785
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Oct 25 14:50:13 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Oct 25 14:50:13 2016 +0200

----------------------------------------------------------------------
 bin/validate-distribution.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/157dc3f7/bin/validate-distribution.sh
----------------------------------------------------------------------
diff --git a/bin/validate-distribution.sh b/bin/validate-distribution.sh
index 4daaf47..2148610 100755
--- a/bin/validate-distribution.sh
+++ b/bin/validate-distribution.sh
@@ -117,11 +117,11 @@ if [ "${TYPE}" = "SOURCE" ]; then
 cd ${DIR_NAME}
 echo -n "* building project ... "
 LOG_FILE="${TMP_DIR}/mvn-clean-install-${VERSION}.log"
-mvn clean install -q 2>&1 > "${LOG_FILE}" || {
+mvn clean install -q > "${LOG_FILE}" 2>&1 || {
   echo "failed"
   echo
   tail -n50 "${LOG_FILE}"
-  echo -e "\n\e[1mThe full log file can be inspected under `pwd`/${LOG_FILE}.\e[0m\n"
+  echo -e "\n\e[1mThe full log file can be inspected under ${LOG_FILE}.\e[0m\n"
   exit 1
 }
 echo "OK"


[18/31] tinkerpop git commit: TINKERPOP-919 Added supportsDuplicateMultiProperties()

Posted by sp...@apache.org.
TINKERPOP-919 Added supportsDuplicateMultiProperties()

That feature allows a graph to specify whether or not it supports multi-properties that allow the same value to be supplied on the same key.


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

Branch: refs/heads/TINKERPOP-932
Commit: 3a7805c73301ad370e70a410326f23aa92b6e99e
Parents: 2d9bb20
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 25 13:50:48 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 26 11:08:11 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  8 ++++++
 .../tinkerpop/gremlin/structure/Graph.java      | 12 +++++++++
 .../gremlin/structure/VertexProperty.java       |  4 +++
 .../gremlin/structure/FeatureSupportTest.java   | 27 ++++++++++++++++++--
 .../gremlin/structure/VertexPropertyTest.java   | 26 ++++++++++++++++---
 6 files changed, 73 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3a7805c7/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 73bfa1e..1df17de 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added `VertexFeatures.supportsDuplicateMultiProperties()` for graphs that only support unique values in multi-properties.
 * Deprecated the "performance" tests in `OptIn`.
 * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3a7805c7/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 0fba8f5..30daae1 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -35,6 +35,14 @@ Upgrading for Providers
 Graph Database Providers
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
+Duplicate Multi-Properties
+++++++++++++++++++++++++++
+
+Added `supportsDuplicateMultiProperties` to `VertexFeatures` so that graph provider who only support unique values as
+multi-properties have more flexibility in describing their graph capabilities.
+
+See: https://issues.apache.org/jira/browse/TINKERPOP-919[TINKERPOP-919]
+
 Deprecated Performance OptIn
 ++++++++++++++++++++++++++++
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3a7805c7/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index ed3f12d..255fbca 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
 import org.apache.tinkerpop.gremlin.structure.io.Io;
 import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.util.FeatureDescriptor;
@@ -512,6 +513,7 @@ public interface Graph extends AutoCloseable, Host {
         public interface VertexFeatures extends ElementFeatures {
             public static final String FEATURE_ADD_VERTICES = "AddVertices";
             public static final String FEATURE_MULTI_PROPERTIES = "MultiProperties";
+            public static final String FEATURE_DUPLICATE_MULTI_PROPERTIES = "DuplicateMultiProperties";
             public static final String FEATURE_META_PROPERTIES = "MetaProperties";
             public static final String FEATURE_REMOVE_VERTICES = "RemoveVertices";
 
@@ -550,6 +552,16 @@ public interface Graph extends AutoCloseable, Host {
             }
 
             /**
+             * Determines if a {@link Vertex} can support non-unique values on the same key. For this value to be
+             * {@code true}, then {@link #supportsMetaProperties()} must also return true. By default this method,
+             * just returns what {@link #supportsMultiProperties()} returns.
+             */
+            @FeatureDescriptor(name = FEATURE_DUPLICATE_MULTI_PROPERTIES)
+            public default boolean supportsDuplicateMultiProperties() {
+                return supportsMultiProperties();
+            }
+
+            /**
              * Determines if a {@link Vertex} can support properties on vertex properties.  It is assumed that a
              * graph will support all the same data types for meta-properties that are supported for regular
              * properties.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3a7805c7/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
index ecbefb3..c6b443c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexProperty.java
@@ -99,6 +99,10 @@ public interface VertexProperty<V> extends Property<V>, Element {
             return new UnsupportedOperationException("Multiple properties on a vertex is not supported");
         }
 
+        public static UnsupportedOperationException identicalMultiPropertiesNotSupported() {
+            return new UnsupportedOperationException("Multiple properties on a vertex is supported, but a single key may not hold the same value more than once");
+        }
+
         public static UnsupportedOperationException metaPropertiesNotSupported() {
             return new UnsupportedOperationException("Properties on a vertex property is not supported");
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3a7805c7/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
index 98406b4..c73474c 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
@@ -697,7 +697,8 @@ public class FeatureSupportTest {
             "multiPropertiesNotSupported",
             "metaPropertiesNotSupported",
             "userSuppliedIdsNotSupported",
-            "userSuppliedIdsOfThisTypeNotSupported"
+            "userSuppliedIdsOfThisTypeNotSupported",
+            "identicalMultiPropertiesNotSupported"
     })
     @ExceptionCoverage(exceptionClass = Element.Exceptions.class, methods = {
             "propertyRemovalNotSupported"
@@ -877,6 +878,22 @@ public class FeatureSupportTest {
         @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
         @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)
+        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_MULTI_PROPERTIES)
+        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_DUPLICATE_MULTI_PROPERTIES, supported = false)
+        public void shouldSupportIdenticalMultiPropertyIfTheSameKeyCanBeAssignedSameValueMoreThanOnce() throws Exception {
+            try {
+                final Vertex v = graph.addVertex("name", "stephen", "name", "stephen");
+                if (2 == IteratorUtils.count(v.properties()))
+                    fail(String.format(INVALID_FEATURE_SPECIFICATION, VertexFeatures.class.getSimpleName(), VertexFeatures.FEATURE_DUPLICATE_MULTI_PROPERTIES));
+            } catch (Exception ex) {
+                validateException(VertexProperty.Exceptions.identicalMultiPropertiesNotSupported(), ex);
+            }
+        }
+
+        @Test
+        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+        @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)
         @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = VertexFeatures.FEATURE_MULTI_PROPERTIES, supported = false)
         public void shouldSupportMultiPropertyIfTheSameKeyCanBeAssignedMoreThanOnce() throws Exception {
             try {
@@ -1023,7 +1040,13 @@ public class FeatureSupportTest {
         @Test
         public void shouldSupportRegularTransactionsIfThreadedTransactionsAreEnabled() {
             if (graphFeatures.supportsThreadedTransactions())
-                assertTrue(graphFeatures.supportsThreadedTransactions());
+                assertThat(graphFeatures.supportsThreadedTransactions(), is(true));
+        }
+
+        @Test
+        public void shouldSupportMultiPropertiesIfSupportingIdenticalMultiProperties() {
+            if (vertexFeatures.supportsDuplicateMultiProperties())
+                assertThat(vertexFeatures.supportsMultiProperties(), is(true));
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3a7805c7/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
index 845be70..04b431d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
@@ -34,6 +34,7 @@ import java.util.Map;
 import java.util.UUID;
 
 import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertThat;
@@ -288,11 +289,8 @@ public class VertexPropertyTest extends AbstractGremlinTest {
                     }
                 }
             });
-
-
         }
 
-
         @Test
         @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
         @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
@@ -329,6 +327,28 @@ public class VertexPropertyTest extends AbstractGremlinTest {
             assertEquals(0, IteratorUtils.count(newMexico.properties(T.key.getAccessor())));
             assertEquals(0, IteratorUtils.count(newMexico.properties(T.value.getAccessor())));
         }
+
+        @Test
+        @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
+        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
+        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_DUPLICATE_MULTI_PROPERTIES)
+        public void shouldAllowIdenticalValuedMultiProperties() {
+            final Vertex v = graph.addVertex();
+            v.property(VertexProperty.Cardinality.list, "name", "stephen");
+            v.property(VertexProperty.Cardinality.list, "name", "stephen");
+            v.property(VertexProperty.Cardinality.list, "name", "steve");
+            v.property(VertexProperty.Cardinality.list, "name", "stephen");
+            v.property(VertexProperty.Cardinality.list, "color", "red");
+
+            tryCommit(graph, g -> {
+                final Vertex vertex = graph.vertices(v).next();
+                assertEquals(4, IteratorUtils.count(vertex.properties("name")));
+                assertEquals(1, IteratorUtils.count(vertex.properties("color")));
+                assertEquals(5, IteratorUtils.count(vertex.properties()));
+
+                assertThat(IteratorUtils.set(vertex.values("name")), contains("stephen", "steve"));
+            });
+        }
     }
 
     public static class VertexPropertyRemoval extends AbstractGremlinTest {


[27/31] tinkerpop git commit: Merge branch 'tp32-tests' of https://github.com/ngageoint/tinkerpop into tp32

Posted by sp...@apache.org.
Merge branch 'tp32-tests' of https://github.com/ngageoint/tinkerpop into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: 8ae1a09215560585658cd260cf273591a95795fc
Parents: 1282a7a 7aa9782
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Oct 29 15:14:30 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Oct 29 15:14:30 2016 -0600

----------------------------------------------------------------------
 .../clustering/peerpressure/PeerPressureVertexProgram.java     | 4 ++--
 .../computer/bulkdumping/BulkDumperVertexProgramTest.java      | 6 ------
 .../apache/tinkerpop/gremlin/structure/TransactionTest.java    | 2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------



[23/31] tinkerpop git commit: Fully shutdown metrics services in Gremlin Server on shutdown CTR

Posted by sp...@apache.org.
Fully shutdown metrics services in Gremlin Server on shutdown CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: 30c2600bff074a7053cecab90baeccb60b087456
Parents: bfda550
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Oct 28 12:00:59 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Oct 28 12:00:59 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                              | 1 +
 .../java/org/apache/tinkerpop/gremlin/server/GremlinServer.java | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/30c2600b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 52ae70d..9685f20 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Fully shutdown metrics services in Gremlin Server on shutdown.
 * Deprecated `tryRandomCommit()` in `AbstractGremlinTest` - the annotation was never added in 3.1.1, and was only deprecated via javadoc.
 * Minor fixes to various test feature requirements in `gremlin-test`.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/30c2600b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
index 4d76e30..e4a7162 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
@@ -313,6 +313,11 @@ public class GremlinServer {
                 }
             });
 
+            // kills reporter threads. this is a last bit of cleanup that can be done. typically, the jvm is headed
+            // for shutdown which would obviously kill the reporters, but when it isn't they just keep reporting.
+            // removing them all will silent them up and release the appropriate resources.
+            MetricManager.INSTANCE.removeAllReporters();
+
             logger.info("Gremlin Server - shutdown complete");
             serverStopped.complete(null);
         }, SERVER_THREAD_PREFIX + "stop").start();


[13/31] tinkerpop git commit: Avoid starting VP worker iterations that never end

Posted by sp...@apache.org.
Avoid starting VP worker iterations that never end

SparkExecutor.executeVertexProgramIteration was written in such a way
that an empty RDD partition would cause it to invoke
VertexProgram.workerIterationStart without ever invoking
VertexProgram.workerIterationEnd.  This seems like a contract
violation.  I have at least one VP that relies on
workerIterationStart|End to allocate and release resources.  Failing
to invoke End like this causes a leak in that VP, as it would for any
VP that uses that resource management pattern.


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

Branch: refs/heads/TINKERPOP-932
Commit: 36e1159a80f539b8bd4a884e5c1cf304ec52c4f9
Parents: b262c7e
Author: Dan LaRocque <da...@hopcount.org>
Authored: Tue Oct 25 19:37:17 2016 -0500
Committer: Dan LaRocque <da...@hopcount.org>
Committed: Tue Oct 25 20:37:17 2016 -0400

----------------------------------------------------------------------
 .../gremlin/spark/process/computer/SparkExecutor.java          | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/36e1159a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkExecutor.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkExecutor.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkExecutor.java
index 8dd2381..6e65e26 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkExecutor.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkExecutor.java
@@ -91,9 +91,15 @@ public final class SparkExecutor {
                 // for each partition of vertices emit a view and their outgoing messages
                 .mapPartitionsToPair(partitionIterator -> {
                     KryoShimServiceLoader.applyConfiguration(graphComputerConfiguration);
+
+                    // if the partition is empty, return without starting a new VP iteration
+                    if (!partitionIterator.hasNext())
+                        return Collections.emptyList();
+
                     final VertexProgram<M> workerVertexProgram = VertexProgram.createVertexProgram(HadoopGraph.open(graphComputerConfiguration), vertexProgramConfiguration); // each partition(Spark)/worker(TP3) has a local copy of the vertex program (a worker's task)
                     final String[] vertexComputeKeysArray = VertexProgramHelper.vertexComputeKeysAsArray(workerVertexProgram.getVertexComputeKeys()); // the compute keys as an array
                     final SparkMessenger<M> messenger = new SparkMessenger<>();
+
                     workerVertexProgram.workerIterationStart(memory.asImmutable()); // start the worker
                     return () -> IteratorUtils.map(partitionIterator, vertexViewIncoming -> {
                         final StarGraph.StarVertex vertex = vertexViewIncoming._2()._1().get(); // get the vertex from the vertex writable


[08/31] tinkerpop git commit: Add int feature requirement on generator tests.

Posted by sp...@apache.org.
Add int feature requirement on generator tests.

These were requiring graphs to support integer and they were not marked as such. While most graphs support int, the Bolt protocol on neo4j does not so it caused some trouble over there. CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: 5cefff0f6365de1d31212e8337a27803ae14ad2c
Parents: 157dc3f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 25 11:31:46 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Oct 25 11:33:49 2016 -0400

----------------------------------------------------------------------
 .../gremlin/algorithm/generator/CommunityGeneratorTest.java      | 4 ++++
 .../gremlin/algorithm/generator/DistributionGeneratorTest.java   | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5cefff0f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/CommunityGeneratorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/CommunityGeneratorTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/CommunityGeneratorTest.java
index a7d3414..45f9b40 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/CommunityGeneratorTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/CommunityGeneratorTest.java
@@ -20,6 +20,7 @@ package org.apache.tinkerpop.gremlin.algorithm.generator;
 
 import org.apache.commons.configuration.Configuration;
 import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
+import org.apache.tinkerpop.gremlin.FeatureRequirement;
 import org.apache.tinkerpop.gremlin.FeatureRequirementSet;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -84,6 +85,7 @@ public class CommunityGeneratorTest {
 
         @Test
         @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
+        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
         public void shouldGenerateDifferentGraph() throws Exception {
             final Configuration configuration = graphProvider.newGraphConfiguration("g1", this.getClass(), name.getMethodName(), null);
             final Graph graph1 = graphProvider.openTestGraph(configuration);
@@ -113,6 +115,7 @@ public class CommunityGeneratorTest {
 
         @Test
         @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
+        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
         public void shouldGenerateSameGraph() throws Exception {
             final Configuration configuration = graphProvider.newGraphConfiguration("g1", this.getClass(), name.getMethodName(), null);
             final Graph graph1 = graphProvider.openTestGraph(configuration);
@@ -194,6 +197,7 @@ public class CommunityGeneratorTest {
 
         @Test
         @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
+        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
         public void shouldProcessVerticesEdges() {
             final Distribution dist = new NormalDistribution(2);
             final CommunityGenerator generator = CommunityGenerator.build(graph)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5cefff0f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/DistributionGeneratorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/DistributionGeneratorTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/DistributionGeneratorTest.java
index 9dc33af..7d668ae 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/DistributionGeneratorTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/DistributionGeneratorTest.java
@@ -20,6 +20,7 @@ package org.apache.tinkerpop.gremlin.algorithm.generator;
 
 import org.apache.commons.configuration.Configuration;
 import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
+import org.apache.tinkerpop.gremlin.FeatureRequirement;
 import org.apache.tinkerpop.gremlin.FeatureRequirementSet;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -67,6 +68,7 @@ public class DistributionGeneratorTest {
 
         @Test
         @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
+        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
         public void shouldGenerateDifferentGraph() throws Exception {
             int executions = 0;
             boolean same = true;
@@ -110,6 +112,7 @@ public class DistributionGeneratorTest {
 
         @Test
         @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
+        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
         public void shouldGenerateSameGraph() throws Exception {
             final Configuration configuration = graphProvider.newGraphConfiguration("g1", this.getClass(), name.getMethodName(), null);
             final Graph g1 = graphProvider.openTestGraph(configuration);
@@ -158,6 +161,7 @@ public class DistributionGeneratorTest {
 
         @Test
         @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
+        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
         public void shouldProcessEdges() {
             final Distribution dist = new NormalDistribution(2);
             final DistributionGenerator generator = DistributionGenerator.build(graph)


[31/31] tinkerpop git commit: TINKERPOP-932 Added "force" option on session close.

Posted by sp...@apache.org.
TINKERPOP-932 Added "force" option on session close.


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

Branch: refs/heads/TINKERPOP-932
Commit: 5802f16484516151e8e3dd68ad16e7b2079c9fee
Parents: 1eac35b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Oct 24 16:06:38 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Oct 31 13:24:56 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  2 +
 docs/src/dev/provider/index.asciidoc            |  5 ++
 .../upgrade/release-3.2.x-incubating.asciidoc   | 20 +++++
 .../apache/tinkerpop/gremlin/driver/Client.java | 24 ++++++
 .../tinkerpop/gremlin/driver/Connection.java    |  7 +-
 .../apache/tinkerpop/gremlin/driver/Tokens.java |  1 +
 .../tinkerpop/gremlin/server/Settings.java      |  1 -
 .../gremlin/server/op/session/Session.java      | 83 ++++++++++++++------
 .../server/op/session/SessionOpProcessor.java   | 21 ++++-
 .../GremlinServerSessionIntegrateTest.java      | 59 ++++++++++++--
 10 files changed, 189 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index cf8c007..ba445b4 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added a `force` option for killing sessions without waiting for transaction close or timeout of a currently running job or multiple jobs.
+* Deprecated `Session.kill()` and `Session.manualKill()`.
 * `SparkGraphComputer` no longer starts a worker iteration if the worker's partition is empty.
 * Added `ProjectStep.getProjectKeys()` for strategies that rely on such information.
 * Added `VertexFeatures.supportsDuplicateMultiProperties()` for graphs that only support unique values in multi-properties.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 00ac4a9..c2f9f20 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -901,6 +901,11 @@ to send an alias pair with key of "g" and value of "g2" and thus allow the scrip
 |=========================================================
 |Key |Type |Description
 |session |String | *Required* The session identifier for the session to close.
+|force |Boolean | Determines if the session should be force closed when the client is closed. Force closing will not
+attempt to close open transactions from existing running jobs and leave it to the underlying graph to decided how to
+proceed with those orphaned transactions. Setting this to `true` tends to lead to faster close operation and release
+of resources which can be desirable if Gremlin Server has a long session timeout and a long script evaluation timeout
+as attempts to close long run jobs can occur more rapidly. If not provided, this value is `false`.
 |=========================================================
 
 Traversal OpProcessor

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/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 30daae1..aac616b 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -54,6 +54,26 @@ following fields were deprecated:
 * `OptIn.SUITE_PROCESS_PERFORMANCE`
 * `OptIn.SUITE_STRUCTURE_PERFORMANCE`
 
+Drivers Providers
+^^^^^^^^^^^^^^^^^
+
+Force Close
++++++++++++
+
+Closing a session will first attempt a proper close of any open transactions. A problem can occur, however, if there is
+a long run job (e.g. an OLAP-based traversal) executing, as that job will block the calls to close the transactions.
+By exercising the option to a do a "forced close" the session will skip trying to close the transactions and just
+attempt to interrupt the long run job. By not closing transactions, the session leaves it up to the underlying graph
+database to sort out how it will deal with those orphaned transactions. On the positive side though (for those graphs
+which do that well) , long run jobs have the opporunity to be cancelled without waiting for a timeout of the job itself
+which will allow resources to be released earlier.
+
+The "force" argument is passed on the "close" message and is a boolean value. This is an optional argument to "close"
+and defaults to `false`.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-932[TINKERPOP-932],
+link:http://tinkerpop.apache.org/docs/current/dev/provider/#_session_opprocessor[Provider Documentation - Session OpProcessor]
+
 TinkerPop 3.2.3
 ---------------
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
index bd397a1..2c448dc 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
@@ -804,10 +804,12 @@ public abstract class Client {
     public static class SessionSettings {
         private final boolean manageTransactions;
         private final String sessionId;
+        private final boolean forceClosed;
 
         private SessionSettings(final Builder builder) {
             manageTransactions = builder.manageTransactions;
             sessionId = builder.sessionId;
+            forceClosed = builder.forceClosed;
         }
 
         /**
@@ -824,6 +826,14 @@ public abstract class Client {
             return sessionId;
         }
 
+        /**
+         * Determines if the session will be force closed. See {@link Builder#forceClosed(boolean)} for more details
+         * on what that means.
+         */
+        public boolean isForceClosed() {
+            return forceClosed;
+        }
+
         public static SessionSettings.Builder build() {
             return new SessionSettings.Builder();
         }
@@ -831,6 +841,7 @@ public abstract class Client {
         public static class Builder {
             private boolean manageTransactions = false;
             private String sessionId = UUID.randomUUID().toString();
+            private boolean forceClosed = false;
 
             private Builder() {}
 
@@ -854,6 +865,19 @@ public abstract class Client {
                 return this;
             }
 
+            /**
+             * Determines if the session should be force closed when the client is closed. Force closing will not
+             * attempt to close open transactions from existing running jobs and leave it to the underlying graph to
+             * decided how to proceed with those orphaned transactions. Setting this to {@code true} tends to lead to
+             * faster close operation which can be desirable if Gremlin Server has a long session timeout and a long
+             * script evaluation timeout as attempts to close long run jobs can occur more rapidly. By default, this
+             * value is {@link false}.
+             */
+            public Builder forceClosed(final boolean forced) {
+                this.forceClosed = forced;
+                return this;
+            }
+
             public SessionSettings create() {
                 return new SessionSettings(this);
             }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
index 2a68032..571d906 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
@@ -306,9 +306,12 @@ final class Connection {
         // be called once. once shutdown is initiated, it shouldn't be executed a second time or else it sends more
         // messages at the server and leads to ugly log messages over there.
         if (shutdownInitiated.compareAndSet(false, true)) {
+            // maybe this should be delegated back to the Client implementation??? kinda weird to instanceof here.....
             if (client instanceof Client.SessionedClient) {
-                // maybe this should be delegated back to the Client implementation???
-                final RequestMessage closeMessage = client.buildMessage(RequestMessage.build(Tokens.OPS_CLOSE)).create();
+                final boolean forceClose = client.getSettings().getSession().get().isForceClosed();
+                final RequestMessage closeMessage = client.buildMessage(
+                        RequestMessage.build(Tokens.OPS_CLOSE).addArg(Tokens.ARGS_FORCE, forceClose)).create();
+
                 final CompletableFuture<ResultSet> closed = new CompletableFuture<>();
                 write(closeMessage, closed);
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/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 25c79af..fb577d7 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,6 +70,7 @@ public final class Tokens {
     public static final String ARGS_BATCH_SIZE = "batchSize";
     public static final String ARGS_BINDINGS = "bindings";
     public static final String ARGS_ALIASES = "aliases";
+    public static final String ARGS_FORCE = "force";
     public static final String ARGS_GREMLIN = "gremlin";
     public static final String ARGS_LANGUAGE = "language";
     public static final String ARGS_SCRIPT_EVAL_TIMEOUT = "scriptEvaluationTimeout";

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
index 8b9fe89..4bb2089 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
@@ -20,7 +20,6 @@ package org.apache.tinkerpop.gremlin.server;
 
 import io.netty.handler.ssl.SslContext;
 import org.apache.tinkerpop.gremlin.driver.MessageSerializer;
-import org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.server.auth.AllowAllAuthenticator;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
index c9bc7c1..8f4da66 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
@@ -52,6 +52,7 @@ public class Session {
     private final String session;
     private final ScheduledExecutorService scheduledExecutorService;
     private final long configuredSessionTimeout;
+    private final long configuredPerGraphCloseTimeout;
 
     private AtomicBoolean killing = new AtomicBoolean(false);
     private AtomicReference<ScheduledFuture> kill = new AtomicReference<>();
@@ -85,7 +86,10 @@ public class Session {
         final Settings.ProcessorSettings processorSettings = this.settings.processors.stream()
                 .filter(p -> p.className.equals(SessionOpProcessor.class.getCanonicalName()))
                 .findAny().orElse(SessionOpProcessor.DEFAULT_SETTINGS);
-        this.configuredSessionTimeout = Long.parseLong(processorSettings.config.get(SessionOpProcessor.CONFIG_SESSION_TIMEOUT).toString());
+        this.configuredSessionTimeout = Long.parseLong(processorSettings.config.getOrDefault(
+                SessionOpProcessor.CONFIG_SESSION_TIMEOUT, SessionOpProcessor.DEFAULT_SESSION_TIMEOUT).toString());
+        this.configuredPerGraphCloseTimeout = Long.parseLong(processorSettings.config.getOrDefault(
+                SessionOpProcessor.CONFIG_PER_GRAPH_CLOSE_TIMEOUT, SessionOpProcessor.DEFAULT_PER_GRAPH_CLOSE_TIMEOUT).toString());
 
         this.gremlinExecutor = initializeGremlinExecutor().create();
     }
@@ -129,17 +133,43 @@ public class Session {
 
     /**
      * Stops the session with call to {@link #kill()} but also stops the session expiration call which ensures that
-     * the session is only killed once.
+     * the session is only killed once. Calls {@link #manualKill(boolean)} with {@code false}.
+     *
+     * @deprecated As of release 3.2.4, replaced by {@link #manualKill(boolean)}.
      */
+    @Deprecated
     public void manualKill() {
+        manualKill(false);
+    }
+
+    /**
+     * Stops the session with call to {@link #kill()} but also stops the session expiration call which ensures that
+     * the session is only killed once. See {@link #kill(boolean)} for information on how what "forcing" the session
+     * kill will mean.
+     */
+    public void manualKill(final boolean force) {
         kill.get().cancel(true);
-        kill();
+        kill(force);
     }
 
     /**
-     * Kills the session and rollback any uncommitted changes on transactional graphs.
+     * Kills the session and rollback any uncommitted changes on transactional graphs. Same as calling
+     * {@link #kill(boolean)} with {@code false}.
+     *
+     * @deprecated As of release 3.2.4, replaced by {@link #kill(boolean)}.
      */
+    @Deprecated
     public synchronized void kill() {
+        kill(false);
+    }
+
+    /**
+     * Kills the session and rollback any uncommitted changes on transactional graphs. When "force" closed, the
+     * session won't bother to try to submit transaction close commands. It will be up to the underlying graph
+     * implementation to determine how it will clean up orphaned transactions. The force will try to cancel scheduled
+     * jobs and interrupt any currently running ones. Interruption is not guaranteed, but an attempt will be made.
+     */
+    public synchronized void kill(final boolean force) {
         killing.set(true);
 
         // if the session has already been removed then there's no need to do this process again.  it's possible that
@@ -147,26 +177,33 @@ public class Session {
         // kill() from being called more than once
         if (!sessions.containsKey(session)) return;
 
-        // when the session is killed open transaction should be rolled back
-        graphManager.getGraphs().entrySet().forEach(kv -> {
-            final Graph g = kv.getValue();
-            if (g.features().graph().supportsTransactions()) {
-                // have to execute the rollback in the executor because the transaction is associated with
-                // that thread of execution from this session
-                try {
-                    executor.submit(() -> {
-                        if (g.tx().isOpen()) {
-                            logger.info("Rolling back open transactions on {} before killing session: {}", kv.getKey(), session);
-                            g.tx().rollback();
-                        }
-                    }).get(30000, TimeUnit.MILLISECONDS);
-                } catch (Exception ex) {
-                    logger.warn("An error occurred while attempting rollback when closing session: " + session, ex);
+        if (!force) {
+            // when the session is killed open transaction should be rolled back
+            graphManager.getGraphs().entrySet().forEach(kv -> {
+                final Graph g = kv.getValue();
+                if (g.features().graph().supportsTransactions()) {
+                    // have to execute the rollback in the executor because the transaction is associated with
+                    // that thread of execution from this session
+                    try {
+                        executor.submit(() -> {
+                            if (g.tx().isOpen()) {
+                                logger.info("Rolling back open transactions on {} before killing session: {}", kv.getKey(), session);
+                                g.tx().rollback();
+                            }
+                        }).get(configuredPerGraphCloseTimeout, TimeUnit.MILLISECONDS);
+                    } catch (Exception ex) {
+                        logger.warn(String.format("An error occurred while attempting rollback on %s when closing session: %s", kv.getKey(), session), ex);
+                    }
                 }
-            }
-        });
-
-        // prevent any additional requests from processing now that the mass rollback has been completed
+            });
+        } else {
+            logger.info("Skipped attempt to close open graph transactions on {} - close was forced", session);
+        }
+
+        // prevent any additional requests from processing. if the kill was not "forced" then jobs were scheduled to
+        // try to rollback open transactions. those jobs either timed-out or completed successfully. either way, no
+        // additional jobs will be allowed, running jobs will be cancelled (if possible) and any scheduled jobs will
+        // be cancelled
         executor.shutdownNow();
 
         sessions.remove(session);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
index bec0c55..651bdb0 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
@@ -66,14 +66,26 @@ public class SessionOpProcessor extends AbstractEvalOpProcessor {
     }
 
     /**
-     * Configuration setting for how long a session will be available before it timesout.
+     * Configuration setting for how long a session will be available before it times out.
      */
     public static final String CONFIG_SESSION_TIMEOUT = "sessionTimeout";
 
     /**
+     * Configuration setting for how long to wait in milliseconds for each configured graph to close any open
+     * transactions when the session is killed.
+     */
+    public static final String CONFIG_PER_GRAPH_CLOSE_TIMEOUT = "perGraphCloseTimeout";
+
+    /**
      * Default timeout for a session is eight hours.
      */
-    public static final long DEFAULT_SESSION_TIMEOUT = 28800000l;
+    public static final long DEFAULT_SESSION_TIMEOUT = 28800000;
+
+    /**
+     * Default amount of time to wait in milliseconds for each configured graph to close any open transactions when
+     * the session is killed.
+     */
+    public static final long DEFAULT_PER_GRAPH_CLOSE_TIMEOUT = 10000;
 
     static final Settings.ProcessorSettings DEFAULT_SETTINGS = new Settings.ProcessorSettings();
 
@@ -81,6 +93,7 @@ public class SessionOpProcessor extends AbstractEvalOpProcessor {
         DEFAULT_SETTINGS.className = SessionOpProcessor.class.getCanonicalName();
         DEFAULT_SETTINGS.config = new HashMap<String, Object>() {{
             put(CONFIG_SESSION_TIMEOUT, DEFAULT_SESSION_TIMEOUT);
+            put(CONFIG_PER_GRAPH_CLOSE_TIMEOUT, DEFAULT_PER_GRAPH_CLOSE_TIMEOUT);
         }};
     }
 
@@ -106,6 +119,8 @@ public class SessionOpProcessor extends AbstractEvalOpProcessor {
                 throw new OpProcessorException(msg, ResponseMessage.build(requestMessage).code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).statusMessage(msg).create());
             }
 
+            final boolean force = requestMessage.<Boolean>optionalArgs(Tokens.ARGS_FORCE).orElse(false);
+
             return Optional.of(ctx -> {
                 // validate the session is present and then remove it if it is.
                 final Session sessionToClose = sessions.get(requestMessage.getArgs().get(Tokens.ARGS_SESSION).toString());
@@ -114,7 +129,7 @@ public class SessionOpProcessor extends AbstractEvalOpProcessor {
                     throw new OpProcessorException(msg, ResponseMessage.build(requestMessage).code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).statusMessage(msg).create());
                 }
 
-                sessionToClose.manualKill();
+                sessionToClose.manualKill(force);
             });
         } else {
             return Optional.empty();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5802f164/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
index 3c1fef9..c384742 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
@@ -49,6 +49,7 @@ import java.util.stream.IntStream;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.core.IsCollectionContaining.hasItem;
 import static org.hamcrest.core.StringStartsWith.startsWith;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
@@ -84,47 +85,95 @@ public class GremlinServerSessionIntegrateTest  extends AbstractGremlinServerInt
         final String nameOfTest = name.getMethodName();
         switch (nameOfTest) {
             case "shouldHaveTheSessionTimeout":
-            case "shouldCloseSessionOnceOnRequest":
                 settings.processors.clear();
                 final Settings.ProcessorSettings processorSettings = new Settings.ProcessorSettings();
                 processorSettings.className = SessionOpProcessor.class.getCanonicalName();
                 processorSettings.config = new HashMap<>();
                 processorSettings.config.put(SessionOpProcessor.CONFIG_SESSION_TIMEOUT, 3000L);
                 settings.processors.add(processorSettings);
-
+                break;
+            case "shouldBlockAdditionalRequestsDuringForceClose":
+            case "shouldCloseSessionOnceOnRequest":
+                clearNeo4j(settings);
                 Logger.getRootLogger().setLevel(Level.INFO);
                 break;
             case "shouldEnsureSessionBindingsAreThreadSafe":
                 settings.threadPoolWorker = 2;
                 break;
+            case "shouldBlockAdditionalRequestsDuringClose":
             case "shouldExecuteInSessionAndSessionlessWithoutOpeningTransactionWithSingleClient":
             case "shouldExecuteInSessionWithTransactionManagement":
             case "shouldRollbackOnEvalExceptionForManagedTransaction":
-                deleteDirectory(new File("/tmp/neo4j"));
-                settings.graphs.put("graph", "conf/neo4j-empty.properties");
+                clearNeo4j(settings);
                 break;
         }
 
         return settings;
     }
 
+    private static void clearNeo4j(Settings settings) {
+        deleteDirectory(new File("/tmp/neo4j"));
+        settings.graphs.put("graph", "conf/neo4j-empty.properties");
+    }
+
     @Test
     public void shouldBlockAdditionalRequestsDuringClose() throws Exception {
+        assumeNeo4jIsPresent();
+
         // this is sorta cobbled together a bit given limits/rules about how you can use Cluster/Client instances.
         // basically, we need one to submit the long run job and one to do the close operation that will cancel the
         // long run job. it is probably possible to do this with some low-level message manipulation but that's
         // probably not necessary
         final Cluster cluster1 = Cluster.build().create();
         final Client client1 = cluster1.connect(name.getMethodName());
-        client1.submit("1+1").all().join();
+        client1.submit("graph.addVertex()").all().join();
         final Cluster cluster2 = Cluster.build().create();
         final Client client2 = cluster2.connect(name.getMethodName());
         client2.submit("1+1").all().join();
 
+        final ResultSet rs = client1.submit("Thread.sleep(3000);1+1");
+
+        // close while the previous request is still executing
+        client2.close();
+
+        assertEquals(2, rs.all().join().get(0).getInt());
+
+        client1.close();
+
+        cluster1.close();
+        cluster2.close();
+
+        // triggered an error during close and since we didn't force close, the attempt to close the transaction
+        // is made
+        assertThat(recordingAppender.getMessages(), hasItem("INFO - Rolling back open transactions on graph before killing session: " + name.getMethodName() + "\n"));
+
+    }
+
+    @Test
+    public void shouldBlockAdditionalRequestsDuringForceClose() throws Exception {
+        assumeNeo4jIsPresent();
+
+        // this is sorta cobbled together a bit given limits/rules about how you can use Cluster/Client instances.
+        // basically, we need one to submit the long run job and one to do the close operation that will cancel the
+        // long run job. it is probably possible to do this with some low-level message manipulation but that's
+        // probably not necessary
+        final Cluster cluster1 = Cluster.build().create();
+        final Client client1 = cluster1.connect(name.getMethodName());
+        client1.submit("graph.addVertex()").all().join();
+        final Cluster cluster2 = Cluster.build().create();
+        final Client.SessionSettings sessionSettings = Client.SessionSettings.build()
+                .sessionId(name.getMethodName())
+                .forceClosed(true).create();
+        final Client client2 = cluster2.connect(Client.Settings.build().useSession(sessionSettings).create());
+        client2.submit("1+1").all().join();
+
         final ResultSet rs = client1.submit("Thread.sleep(10000);1+1");
 
         client2.close();
 
+        // because the close was forced, the message should appear immediately
+        assertThat(recordingAppender.getMessages(), hasItem("INFO - Skipped attempt to close open graph transactions on " + name.getMethodName() + " - close was forced\n"));
+
         try {
             rs.all().join();
             fail("The close of the session on client2 should have interrupted the script sent on client1");


[09/31] tinkerpop git commit: Merge branch 'tp31' into tp32

Posted by sp...@apache.org.
Merge branch 'tp31' into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: 285ff35e26d01f4a228d936d07e4e047933f0522
Parents: 487b3bf 1f84ad3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 25 11:34:29 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Oct 25 11:34:29 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                            | 5 +++++
 docs/src/upgrade/release-3.1.x-incubating.asciidoc            | 7 +++++++
 .../gremlin/algorithm/generator/CommunityGeneratorTest.java   | 4 ++++
 .../algorithm/generator/DistributionGeneratorTest.java        | 4 ++++
 4 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/285ff35e/CHANGELOG.asciidoc
----------------------------------------------------------------------


[26/31] tinkerpop git commit: added ProjectStep.getProjectKeys() -- should we make this an unmodifiable list.

Posted by sp...@apache.org.
added ProjectStep.getProjectKeys() -- should we make this an unmodifiable list.


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

Branch: refs/heads/TINKERPOP-932
Commit: 1282a7ae14344ba21664631584be0462c67eba40
Parents: c4682f1
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Oct 29 15:12:06 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Oct 29 15:12:06 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                               | 1 +
 .../gremlin/process/traversal/step/map/ProjectStep.java          | 4 ++++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1282a7ae/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 48f08ef..baf50a1 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added `ProjectStep.getProjectKeys()` for strategies that rely on such information.
 * Added `VertexFeatures.supportsDuplicateMultiProperties()` for graphs that only support unique values in multi-properties.
 * Deprecated the "performance" tests in `OptIn`.
 * Added `Pick.none` and `Pick.any` to the serializers and importers.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1282a7ae/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStep.java
index 83e095a..3ddd4a6 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStep.java
@@ -97,6 +97,10 @@ public final class ProjectStep<S, E> extends MapStep<S, Map<String, E>> implemen
         this.traversalRing.addTraversal(this.integrateChild(selectTraversal));
     }
 
+    public List<String> getProjectKeys() {
+        return this.projectKeys;
+    }
+
     @Override
     public Set<TraverserRequirement> getRequirements() {
         return this.getSelfAndChildRequirements();


[07/31] tinkerpop git commit: Setup changelog/upgrade docs for 3.1.6

Posted by sp...@apache.org.
Setup changelog/upgrade docs for 3.1.6


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

Branch: refs/heads/TINKERPOP-932
Commit: 1f84ad39d5a9804951340f42d9e79d7d92433ce7
Parents: 5cefff0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Oct 25 11:33:08 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Oct 25 11:33:49 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                 | 5 +++++
 docs/src/upgrade/release-3.1.x-incubating.asciidoc | 7 +++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1f84ad39/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4c0ca63..551a2be 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -22,6 +22,11 @@ TinkerPop 3.1.0 (A 187 On The Undercover Gremlinz)
 
 image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/gremlin-gangster.png[width=185]
 
+[[release-3-1-6]]
+TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
 [[release-3-1-5]]
 TinkerPop 3.1.5 (Release Date: October 17, 2016)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1f84ad39/docs/src/upgrade/release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.1.x-incubating.asciidoc b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
index 5779dc8..925b21b 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -22,6 +22,13 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 *A 187 On The Undercover Gremlinz*
 
+TinkerPop 3.1.6
+---------------
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the link:https://github.com/apache/tinkerpop/blob/3.1.6/CHANGELOG.asciidoc#release-3-1-6[changelog] for a complete list of all the modifications that are part of this release.
+
 TinkerPop 3.1.5
 ---------------
 


[21/31] tinkerpop git commit: Merge branch 'tp31' into tp32

Posted by sp...@apache.org.
Merge branch 'tp31' into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: 5a16f4c8073edb159fac6a711a9593736ef9ffa3
Parents: 84973f3 bfda550
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 26 14:32:17 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 26 14:32:17 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                                  | 1 +
 .../main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5a16f4c8/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5a16f4c8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
----------------------------------------------------------------------


[30/31] tinkerpop git commit: updated CHANGELOG

Posted by sp...@apache.org.
updated CHANGELOG


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

Branch: refs/heads/TINKERPOP-932
Commit: 1eac35b9b6b13860293292dd8a141a44fd3af7e0
Parents: d8eaf20 b0bedf6
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Sat Oct 29 15:19:21 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Sat Oct 29 15:19:21 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   2 +
 .../decoration/VertexProgramStrategy.java       |   5 -
 .../process/traversal/TraversalStrategies.java  |  11 +-
 .../process/TraversalStrategiesTest.java        | 195 ++++++++++++++++++-
 4 files changed, 202 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1eac35b9/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index baf50a1,1c7441b..cf8c007
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,10 -26,7 +26,12 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
++* `SparkGraphComputer` no longer starts a worker iteration if the worker's partition is empty.
 +* Added `ProjectStep.getProjectKeys()` for strategies that rely on such information.
 +* Added `VertexFeatures.supportsDuplicateMultiProperties()` for graphs that only support unique values in multi-properties.
 +* Deprecated the "performance" tests in `OptIn`.
 +* Added `Pick.none` and `Pick.any` to the serializers and importers.
+ * Added a class loader to `TraversalStrategies.GlobalCache` which guarantees strategies are registered prior to `GlobalCache.getStrategies()`.
  * Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
  
  [[release-3-2-3]]


[02/31] tinkerpop git commit: fixed a severe bug where GraphComputer strategies were not being loaded until the second usage of the traversal source -- had to do with when static{} code blocks are initialized. dar. sucks. Work around is for the user to s

Posted by sp...@apache.org.
fixed a severe bug where GraphComputer strategies were not being loaded until the second usage of the traversal source -- had to do with when static{} code blocks are initialized. dar. sucks. Work around is for the user to simply do SparkGraphComputer.class in their code prior to using SparkGraphComputer (or whatever XXXGraphComptuer with registered strategies).


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

Branch: refs/heads/TINKERPOP-932
Commit: b262c7ec475c2541d3f9af22fc9f9f57efa290a5
Parents: 7bb0c90
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Oct 24 15:46:11 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Oct 24 15:46:11 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                              | 4 ++--
 .../traversal/strategy/decoration/VertexProgramStrategy.java    | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b262c7ec/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 04b642e..4dee4c2 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,10 +23,10 @@ TinkerPop 3.2.0 (Nine Inch Gremlins)
 image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/nine-inch-gremlins.png[width=185]
 
 [[release-3-2-4]]
-TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
+TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-
+* Fixed a severe bug where `GraphComputer` strategies are not being loaded until the second use of the traversal source.
 
 [[release-3-2-3]]
 TinkerPop 3.2.3 (Release Date: October 17, 2016)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b262c7ec/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
index 89e40cb..0eeae3c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java
@@ -171,6 +171,11 @@ public final class VertexProgramStrategy extends AbstractTraversalStrategy<Trave
             }
         } else
             graphComputerClass = this.computer.getGraphComputerClass();
+        try {
+            Class.forName(graphComputerClass.getCanonicalName());
+        } catch (final ClassNotFoundException e) {
+            throw new IllegalStateException(e.getMessage(), e);
+        }
         final List<TraversalStrategy<?>> graphComputerStrategies = TraversalStrategies.GlobalCache.getStrategies(graphComputerClass).toList();
         traversalSource.getStrategies().addStrategies(graphComputerStrategies.toArray(new TraversalStrategy[graphComputerStrategies.size()]));
     }


[06/31] tinkerpop git commit: Merge branch 'tp31' into tp32

Posted by sp...@apache.org.
Merge branch 'tp31' into tp32


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

Branch: refs/heads/TINKERPOP-932
Commit: 487b3bf1f5c6d75e7ae5d2946d001a19a0f5a593
Parents: b262c7e 157dc3f
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Oct 25 14:52:35 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Oct 25 14:52:35 2016 +0200

----------------------------------------------------------------------
 bin/validate-distribution.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[17/31] tinkerpop git commit: Update changelog retroactively for 3.2.3.

Posted by sp...@apache.org.
Update changelog retroactively for 3.2.3.

There was a missing JIRA ticket that should have been closed CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: 5f49561c56cd2a432f8f8503fb02ca2d26c31541
Parents: ea8cd65
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 26 10:37:56 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 26 10:37:56 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5f49561c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 74bfcef..565278c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -114,6 +114,7 @@ Bugs
 * TINKERPOP-1458 Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" op
 * TINKERPOP-1466 PeerPressureTest has been failing recently
 * TINKERPOP-1472 RepeatUnrollStrategy does not semi-compile inlined repeat traversal
+* TINKERPOP-1476 TinkerGraph does not get typed with the right type name in GraphSON
 * TINKERPOP-1495 Global list deduplication doesn't work in OLAP
 * TINKERPOP-1500 and/or infix and choose() do not work correctly.
 * TINKERPOP-1511 Remote client addV, V()