You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/03/09 20:30:39 UTC
[1/2] incubator-tinkerpop git commit: Fixed a bug where
OrderGlobalStep and OrderLocalStep were not incorporating their childrens
traverser requirements. Add a test to CountTest that verifies that the bug is
now fixed.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/tp31 712fca251 -> 24cae1f56
Fixed a bug where OrderGlobalStep and OrderLocalStep were not incorporating their childrens traverser requirements. Add a test to CountTest that verifies that the bug is now fixed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/3eadf73f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/3eadf73f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/3eadf73f
Branch: refs/heads/tp31
Commit: 3eadf73f6653965356b2ec2b25d1b5f9c01545b2
Parents: b529398
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Mar 9 12:19:23 2016 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Mar 9 12:19:23 2016 -0700
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../traversal/step/map/OrderGlobalStep.java | 2 +-
.../traversal/step/map/OrderLocalStep.java | 2 +-
.../traversal/step/map/GroovyCountTest.groovy | 5 +++
.../process/traversal/step/map/CountTest.java | 35 ++++++++++++++++++--
5 files changed, 40 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3eadf73f/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a39683a..54df044 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Fixed a bug where `OrderGlobalStep` and `OrderLocalStep` were not incorporating their children's traverser requirements.
* Fixed a compilation bug in `TraversalExplanation`.
* Bumped to Netty 4.0.34.Final.
* Added "interpreter mode" for the `ScriptEngine` and Gremlin Server which allows variables defined with `def` or a type to be recognized as "global".
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3eadf73f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
index 6b9a2cc..06d368b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java
@@ -87,7 +87,7 @@ public final class OrderGlobalStep<S> extends CollectingBarrierStep<S> implement
@Override
public Set<TraverserRequirement> getRequirements() {
- return Collections.singleton(TraverserRequirement.OBJECT);
+ return this.getSelfAndChildRequirements(TraverserRequirement.OBJECT);
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3eadf73f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderLocalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderLocalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderLocalStep.java
index 35493cf..37d6c33 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderLocalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderLocalStep.java
@@ -91,7 +91,7 @@ public final class OrderLocalStep<S, M> extends MapStep<S, S> implements Compara
@Override
public Set<TraverserRequirement> getRequirements() {
- return Collections.singleton(TraverserRequirement.OBJECT);
+ return this.getSelfAndChildRequirements(TraverserRequirement.OBJECT);
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3eadf73f/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyCountTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyCountTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyCountTest.groovy
index 016749f..d617a3d 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyCountTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyCountTest.groovy
@@ -67,5 +67,10 @@ public abstract class GroovyCountTest {
public Traversal<Vertex, Long> get_g_V_fold_countXlocalX() {
TraversalScriptHelper.compute("g.V.fold.count(local)", g);
}
+
+ @Override
+ public Traversal<Vertex, String> get_g_V_both_both_order_byXcount_decrX_name() {
+ TraversalScriptHelper.compute("g.V.both.both.order.by(count(), decr).name", g);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3eadf73f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CountTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CountTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CountTest.java
index 320847c..046be1e 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CountTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CountTest.java
@@ -21,19 +21,22 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
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.IgnoreEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.Order;
import org.apache.tinkerpop.gremlin.process.traversal.Scope;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.List;
+
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.GRATEFUL;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -57,6 +60,8 @@ public abstract class CountTest extends AbstractGremlinProcessTest {
public abstract Traversal<Vertex, Long> get_g_V_fold_countXlocalX();
+ public abstract Traversal<Vertex, String> get_g_V_both_both_order_byXcount_decrX_name();
+
@Test
@LoadGraphWith(MODERN)
public void g_V_count() {
@@ -138,6 +143,25 @@ public abstract class CountTest extends AbstractGremlinProcessTest {
assertFalse(traversal.hasNext());
}
+ @Test
+ @LoadGraphWith
+ public void g_V_both_both_order_byXcount_decrX_name() {
+ final Traversal<Vertex, String> traversal = get_g_V_both_both_order_byXcount_decrX_name();
+ printTraversalForm(traversal);
+ final List<String> names = traversal.toList();
+ for (int i = 0; i < 7; i++) {
+ assertEquals("marko", names.get(i));
+ }
+ assertTrue(names.get(7).equals("josh") || names.get(7).equals("lop"));
+ assertEquals(7l, names.stream().filter(name -> name.equals("marko")).count());
+ assertEquals(7l, names.stream().filter(name -> name.equals("josh")).count());
+ assertEquals(7l, names.stream().filter(name -> name.equals("lop")).count());
+ assertEquals(3l, names.stream().filter(name -> name.equals("peter")).count());
+ assertEquals(3l, names.stream().filter(name -> name.equals("ripple")).count());
+ assertEquals(3l, names.stream().filter(name -> name.equals("vadas")).count());
+ }
+
+
public static class Traversals extends CountTest {
@Override
@@ -166,7 +190,7 @@ public abstract class CountTest extends AbstractGremlinProcessTest {
}
@Override
- public Traversal<Vertex, Long> get_g_V_repeatXoutX_timesX5X_asXaX_outXwrittenByX_asXbX_selectXa_bX_count() {
+ public Traversal<Vertex, Long> get_g_V_repeatXoutX_timesX5X_asXaX_outXwrittenByX_asXbX_selectXa_bX_count() {
return g.V().repeat(out()).times(5).as("a").out("writtenBy").as("b").select("a", "b").count();
}
@@ -179,5 +203,10 @@ public abstract class CountTest extends AbstractGremlinProcessTest {
public Traversal<Vertex, Long> get_g_V_fold_countXlocalX() {
return g.V().fold().count(Scope.local);
}
+
+ @Override
+ public Traversal<Vertex, String> get_g_V_both_both_order_byXcount_decrX_name() {
+ return g.V().both().both().order().by(__.count(), Order.decr).values("name");
+ }
}
}
[2/2] incubator-tinkerpop git commit: remerged.
Posted by ok...@apache.org.
remerged.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/24cae1f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/24cae1f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/24cae1f5
Branch: refs/heads/tp31
Commit: 24cae1f5633aa731f26f616ae00708d05e21ca78
Parents: 3eadf73 712fca2
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Mar 9 12:19:58 2016 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Mar 9 12:19:58 2016 -0700
----------------------------------------------------------------------
CHANGELOG.asciidoc | 4 +
.../src/reference/gremlin-applications.asciidoc | 39 ++-
.../upgrade/release-3.1.x-incubating.asciidoc | 9 +
gremlin-core/pom.xml | 1 -
.../apache/tinkerpop/gremlin/driver/Client.java | 1 -
.../tinkerpop/gremlin/driver/Cluster.java | 12 +
.../tinkerpop/gremlin/driver/Connection.java | 54 ++-
.../gremlin/driver/ConnectionPool.java | 2 +-
.../tinkerpop/gremlin/driver/ResultQueue.java | 5 +-
.../tinkerpop/gremlin/driver/Settings.java | 120 ++++++-
gremlin-server/pom.xml | 1 -
.../gremlin/server/op/session/Session.java | 37 ++-
.../server/op/session/SessionOpProcessor.java | 4 +-
.../server/GremlinDriverIntegrateTest.java | 1 +
.../server/GremlinServerIntegrateTest.java | 197 +----------
.../GremlinServerSessionIntegrateTest.java | 332 +++++++++++++++++++
pom.xml | 8 +-
17 files changed, 609 insertions(+), 218 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/24cae1f5/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 54df044,dda6e80..1829c5c
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,8 -26,11 +26,12 @@@ image::https://raw.githubusercontent.co
TinkerPop 3.1.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Fixed a bug where `OrderGlobalStep` and `OrderLocalStep` were not incorporating their children's traverser requirements.
+ * Bump to commons-collections 3.2.2.
* Fixed a compilation bug in `TraversalExplanation`.
+ * Fixed bug where a session explicitly closed was being closed again by session expiration.
+ * Improved the recovery options for Gremlin Driver after failed requests to Gremlin Server.
+ * Added `maxWaitForSessionClose` to the settings for Gremlin Driver.
* Bumped to Netty 4.0.34.Final.
* Added "interpreter mode" for the `ScriptEngine` and Gremlin Server which allows variables defined with `def` or a type to be recognized as "global".
* Bumped to Apache Groovy 2.4.6.