You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2018/02/27 17:18:12 UTC

[01/50] tinkerpop git commit: TINKERPOP-1857 Added full coverage of order() GLV tests [Forced Update!]

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1777 1dfe1b859 -> be3a5db18 (forced update)


TINKERPOP-1857 Added full coverage of order() GLV tests


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

Branch: refs/heads/TINKERPOP-1777
Commit: 314481e5e7410cdd6812a5095f3db6e705ec7f81
Parents: 2735643
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 6 08:04:10 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Order.feature         | 193 +++++++++++++++++++
 .../gremlin/process/FeatureCoverageTest.java    |   4 +-
 2 files changed, 196 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/314481e5/gremlin-test/features/map/Order.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Order.feature b/gremlin-test/features/map/Order.feature
index 976906f..e7ff00c 100644
--- a/gremlin-test/features/map/Order.feature
+++ b/gremlin-test/features/map/Order.feature
@@ -130,3 +130,196 @@ Feature: Step - order()
       | m[{"a":"v[peter]","b":"v[lop]"}] |
       | m[{"a":"v[josh]","b":"v[ripple]"}] |
       | m[{"a":"v[josh]","b":"v[lop]"}] |
+
+  Scenario: g_V_both_hasLabelXpersonX_order_byXage_decrX_limitX5X_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().both().hasLabel("person").order().by("age", Order.decr).limit(5).values("name")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | peter  |
+      | josh  |
+      | josh  |
+      | josh |
+      | marko  |
+
+  Scenario: g_V_properties_order_byXkey_decrX_key
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().properties().order().by(T.key, Order.decr).key()
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | name   |
+      | name   |
+      | name   |
+      | name   |
+      | name   |
+      | name   |
+      | lang   |
+      | lang   |
+      | age    |
+      | age    |
+      | age    |
+      | age    |
+
+  Scenario: g_V_hasLabelXpersonX_order_byXvalueXageX__decrX_name
+    Given the modern graph
+    And using the parameter l1 defined as "c[it.value('age')]"
+    And the traversal of
+      """
+      g.V().hasLabel("person").order().by(l1, Order.decr).values("name")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | peter  |
+      | josh   |
+      | marko  |
+      | vadas  |
+
+  Scenario: g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").group().by("name").by(__.outE().values("weight").sum()).order(Scope.local).by(Column.values)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"vadas":"d[0].d","peter":"d[0.2].d","josh":"d[1.4].d","marko":"d[1.9].d"}] |
+
+  Scenario: g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().local(__.bothE().values("weight").fold()).order().by(__.sum(Scope.local), Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | l[d[1.0].f,d[0.4].f,d[1.0].f] |
+      | l[d[0.4].f,d[0.5].f,d[1.0].f] |
+      | l[d[0.4].f,d[0.4].f,d[0.2].f] |
+      | l[d[1.0].f]                   |
+      | l[d[0.5].f]                   |
+      | l[d[0.2].f]                   |
+
+  Scenario: g_V_group_byXlabelX_byXname_order_byXdecrX_foldX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().group().by(T.label).by(__.values("name").order().by(Order.decr).fold())
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"software":"l[ripple,lop]","person":"l[vadas,peter,marko,josh]"}]  |
+
+  Scenario: g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").group().by("name").by(__.outE().values("weight").sum()).unfold().order().by(Column.values, Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"marko":"d[1.9].d"}]  |
+      | m[{"josh":"d[1.4].d"}]  |
+      | m[{"peter":"d[0.2].d"}]  |
+      | m[{"vadas":"d[0].d"}]  |
+
+  Scenario: g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("v").map(__.bothE().values("weight").fold()).sum(Scope.local).as("s").select("v", "s").order().by(__.select("s"), Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"v":"v[josh]","s":"d[2.4].d"}]  |
+      | m[{"v":"v[marko]","s":"d[1.9].d"}]  |
+      | m[{"v":"v[lop]","s":"d[1.0].d"}]  |
+      | m[{"v":"v[ripple]","s":"d[1.0].d"}]  |
+      | m[{"v":"v[vadas]","s":"d[0.5].d"}]  |
+      | m[{"v":"v[peter]","s":"d[0.2].d"}]  |
+
+  Scenario: g_V_hasLabelXpersonX_fold_orderXlocalX_byXageX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").fold().order(Scope.local).by("age")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | l[v[vadas],v[marko],v[josh],v[peter]] |
+
+  Scenario: g_V_both_hasLabelXpersonX_order_byXage_decrX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().both().hasLabel("person").order().by("age", Order.decr).values("name")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | peter  |
+      | josh   |
+      | josh   |
+      | josh   |
+      | marko  |
+      | marko  |
+      | marko  |
+      | vadas  |
+
+  Scenario: g_V_order_byXoutE_count__decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().order().by(__.outE().count(), Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | v[marko] |
+      | v[josh]   |
+      | v[peter] |
+      | v[vadas] |
+      | v[lop] |
+      | v[ripple] |
+
+  Scenario: g_V_hasLabelXpersonX_order_byXageX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").order().by("age")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | v[vadas] |
+      | v[marko] |
+      | v[josh]   |
+      | v[peter] |
+
+  Scenario: g_VX1X_hasXlabel_personX_mapXmapXint_ageXX_orderXlocalX_byXvalues_decrX_byXkeys_incrX
+    Given the modern graph
+    And using the parameter v1 defined as "v[marko]"
+    And using the parameter l1 defined as "c[[1:it.get().value('age'),2:it.get().value('age')*2,3:it.get().value('age')*3,4:it.get().value('age')]]"
+    And the traversal of
+      """
+      g.V(v1).hasLabel("person").map(l1).order(Scope.local).by(Column.values, Order.decr).by(Column.keys, Order.incr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"3":"d[87].i","2":"d[58].i","1":"d[29].i","4":"d[29].i"}] |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/314481e5/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 48c64b9..b2a83d7 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -113,7 +113,9 @@ public class FeatureCoverageTest {
             "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__b_followedBy_c__c_writtenBy_d__whereXd_neqXaXXX",
             "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_dX_whereXc_sungBy_dX_whereXd_hasXname_GarciaXX",
             "get_g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
-            "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count");
+            "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
+            "g_V_hasXsong_name_OHBOYX_outXfollowedByX_outXfollowedByX_order_byXperformancesX_byXsongType_incrX",
+            "g_V_hasLabelXsongX_order_byXperfomances_decrX_byXnameX_rangeX110_120X_name");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")


[32/50] tinkerpop git commit: Big fixup of brokeness on master

Posted by dk...@apache.org.
Big fixup of brokeness on master

Lots of missing gherkin tests. Not sure how those were missing. Perhaps certain PRs were rebased or perhaps I'd needed to rebase when i merged the master PR that had the full GLV suite in place. Anyway, should all pass now. CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: ab566c951c12d204cb7950f9683afdbceda39372
Parents: 1c49c27
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 22 17:23:33 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 22 17:23:33 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/branch/Optional.feature |  28 +++++
 gremlin-test/features/filter/Range.feature    |  96 +++++++++++++++-
 gremlin-test/features/filter/Tail.feature     |  47 +++++++-
 gremlin-test/features/map/AddEdge.feature     | 122 ++++++++++++++++++++-
 gremlin-test/features/map/AddVertex.feature   |  52 +++++++++
 gremlin-test/features/map/Properties.feature  |   9 +-
 gremlin-test/features/map/ValueMap.feature    |  15 ++-
 7 files changed, 364 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab566c95/gremlin-test/features/branch/Optional.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Optional.feature b/gremlin-test/features/branch/Optional.feature
index 5d2be8d..b69fe13 100644
--- a/gremlin-test/features/branch/Optional.feature
+++ b/gremlin-test/features/branch/Optional.feature
@@ -79,3 +79,31 @@ Feature: Step - choose()
       | p[v[josh],v[lop]] |
       | p[v[ripple]] |
       | p[v[peter],v[lop]] |
+
+  Scenario: g_VX1X_optionalXaddVXdogXX_label
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).optional(__.addV("dog")).label()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | dog |
+    And the graph should return 7 for count of "g.V()"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab566c95/gremlin-test/features/filter/Range.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Range.feature b/gremlin-test/features/filter/Range.feature
index 907e421..fd3c63f 100644
--- a/gremlin-test/features/filter/Range.feature
+++ b/gremlin-test/features/filter/Range.feature
@@ -168,4 +168,98 @@ Feature: Step - range()
     Then the result should be unordered
       | result |
       | m[{"b":"josh"}] |
-      | m[{"b":"josh"}] |
\ No newline at end of file
+      | m[{"b":"josh"}] |
+
+  Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_1_3X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("a").out().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).range(Scope.local, 1, 3)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | l[josh,ripple] |
+      | l[josh,lop] |
+
+  Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_1_2X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("a").out().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).range(Scope.local, 1, 2)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | josh |
+      | josh |
+
+  Scenario: g_V_hasLabelXpersonX_order_byXageX_skipX1X_valuesXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").order().by("age").skip(1).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | josh |
+      | peter |
+
+  Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_4_5X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("a").out().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).range(Scope.local, 4, 5)
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_outE_valuesXweightX_fold_orderXlocalX_skipXlocal_2X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").fold().order(Scope.local).skip(Scope.local, 2)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | l[d[0.4].d,d[0.5].d,d[1.0].d,d[1.0].d] |
+
+  Scenario: g_V_asXaX_in_asXaX_in_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_limitXlocal_1X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").in().as("a").in().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).limit(Scope.local, 1)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | lop    |
+      | ripple |
+
+  Scenario: g_V_asXaX_in_asXaX_in_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_limitXlocal_2X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").in().as("a").in().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).limit(Scope.local, 2)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | l[lop,josh] |
+      | l[ripple,josh] |
+
+  Scenario: g_V_hasLabelXpersonX_order_byXageX_valuesXnameX_skipX1X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").order().by("age").values("name").skip(1)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | josh |
+      | peter |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab566c95/gremlin-test/features/filter/Tail.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Tail.feature b/gremlin-test/features/filter/Tail.feature
index ef0643e..2db579c 100644
--- a/gremlin-test/features/filter/Tail.feature
+++ b/gremlin-test/features/filter/Tail.feature
@@ -142,4 +142,49 @@ Feature: Step - tail()
     Then the result should be unordered
       | result |
       | m[{"c":"ripple"}] |
-      | m[{"c":"lop"}] |
\ No newline at end of file
+      | m[{"c":"lop"}] |
+
+  Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocal_1X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("a").out().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).tail(Scope.local, 1)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | ripple |
+      | lop |
+
+  Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("a").out().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).tail(Scope.local)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | ripple |
+      | lop |
+
+  Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXlimitXlocal_0XX_tailXlocal_1X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("a").out().as("a").select(Pop.mixed, "a").by(__.limit(Scope.local, 0)).tail(Scope.local, 1)
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocal_2X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("a").out().as("a").select(Pop.mixed, "a").by(__.unfold().values("name").fold()).tail(Scope.local, 2)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | l[josh,ripple] |
+      | l[josh,lop] |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab566c95/gremlin-test/features/map/AddEdge.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/AddEdge.feature b/gremlin-test/features/map/AddEdge.feature
index f3a55bb..69c24c2 100644
--- a/gremlin-test/features/map/AddEdge.feature
+++ b/gremlin-test/features/map/AddEdge.feature
@@ -304,4 +304,124 @@ Feature: Step - addE()
     And the graph should return 6 for count of "g.E().hasLabel(\"next\")"
     And the graph should return 2 for count of "g.V().limit(1).bothE()"
     And the graph should return 1 for count of "g.V().limit(1).inE()"
-    And the graph should return 1 for count of "g.V().limit(1).outE()"
\ No newline at end of file
+    And the graph should return 1 for count of "g.V().limit(1).outE()"
+
+  Scenario: g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And using the parameter v1 defined as "v[marko]"
+    And the traversal of
+      """
+      g.V().has("name", "marko").as("a").outE("created").as("b").inV().addE(__.select("b").label()).to("a")
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 7 for count of "g.E()"
+    And the graph should return 4 for count of "g.V(v1).bothE()"
+    And the graph should return 1 for count of "g.V(v1).inE(\"created\")"
+    And the graph should return 1 for count of "g.V(v1).in(\"created\").has(\"name\",\"lop\")"
+    And the graph should return 1 for count of "g.V(v1).outE(\"created\")"
+
+  Scenario: g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_decrX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And using the parameter v2 defined as "v[vadas]"
+    And the traversal of
+      """
+      g.addE(__.V().outE().label().groupCount().order(Scope.local).by(Column.values, Order.decr).select(Column.keys).unfold().limit(1)).from(__.V().has("name", "vadas")).to(__.V().has("name", "lop"))
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 7 for count of "g.E()"
+    And the graph should return 2 for count of "g.V(v2).bothE()"
+    And the graph should return 1 for count of "g.V(v2).inE(\"knows\")"
+    And the graph should return 1 for count of "g.V(v2).outE(\"created\")"
+    And the graph should return 1 for count of "g.V(v2).out(\"created\").has(\"name\",\"lop\")"
+
+  Scenario: g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And using the parameter v1 defined as "v[marko]"
+    And using the parameter v6 defined as "v[peter]"
+    And using the parameter dotOne defined as "d[0.1].d"
+    And the traversal of
+      """
+      g.addE("knows").from(v1).to(v6).property("weight", dotOne)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 7 for count of "g.E()"
+    And the graph should return 3 for count of "g.V(v1).outE(\"knows\")"
+    And the graph should return 1 for count of "g.V(v1).out(\"knows\").has(\"name\",\"peter\")"
+
+  Scenario: g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And using the parameter v1 defined as "v[marko]"
+    And using the parameter v6 defined as "v[peter]"
+    And using the parameter dotOne defined as "d[0.1].d"
+    And the traversal of
+      """
+      g.V(v1).addE("knows").to(v6).property("weight", dotOne)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 7 for count of "g.E()"
+    And the graph should return 3 for count of "g.V(v1).outE(\"knows\")"
+    And the graph should return 1 for count of "g.V(v1).out(\"knows\").has(\"name\",\"peter\")"
\ No newline at end of file

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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab566c95/gremlin-test/features/map/Properties.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Properties.feature b/gremlin-test/features/map/Properties.feature
index 3c926fa..dafb13e 100644
--- a/gremlin-test/features/map/Properties.feature
+++ b/gremlin-test/features/map/Properties.feature
@@ -51,4 +51,11 @@ Feature: Step - properties()
       | josh  |
       | d[32].i |
       | peter |
-      | d[35].i |
\ No newline at end of file
+      | d[35].i |
+
+  Scenario: g_injectXg_VX1X_propertiesXnameX_nextX_value
+    Given an unsupported test
+    Then nothing should happen because
+      """
+      The test suite doesn't do well with vertex property values.
+      """
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab566c95/gremlin-test/features/map/ValueMap.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/ValueMap.feature b/gremlin-test/features/map/ValueMap.feature
index c851e53..109318f 100644
--- a/gremlin-test/features/map/ValueMap.feature
+++ b/gremlin-test/features/map/ValueMap.feature
@@ -91,4 +91,17 @@ Feature: Step - valueMap()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"name": ["lop"], "lang": ["java"]}] |
\ No newline at end of file
+      | m[{"name": ["lop"], "lang": ["java"]}] |
+
+  Scenario: g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMapXtrueX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").filter(__.outE("created")).valueMap(true)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name": ["marko"], "age": [29], "t[label]":"person", "t[id]":"v[marko].id"}] |
+      | m[{"name": ["josh"], "age": [32], "t[label]":"person", "t[id]":"v[josh].id"}] |
+      | m[{"name": ["peter"], "age": [35], "t[label]":"person", "t[id]":"v[peter].id"}] |
\ No newline at end of file


[35/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'


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

Branch: refs/heads/TINKERPOP-1777
Commit: d683206a76208bfcff945eb54f2818be9c66b419
Parents: 016111e 3df6c58
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 23 07:00:50 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 23 07:00:50 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../process/computer/GraphComputerTest.java     | 70 ++++++++++++++++
 .../spark/process/computer/SparkMessenger.java  |  2 +-
 .../process/computer/SparkMessengerTest.java    | 86 ++++++++++++++++++++
 4 files changed, 158 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d683206a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------


[27/50] tinkerpop git commit: Added correct setting of future exceptions, pursuant to TINKERPOP-1883

Posted by dk...@apache.org.
Added correct setting of future exceptions, pursuant to TINKERPOP-1883

https://issues.apache.org/jira/browse/TINKERPOP-1883

Conflicts:
	gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py


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

Branch: refs/heads/TINKERPOP-1777
Commit: 545f3bf895a10f5ec76b466f71b93fc1304f88d3
Parents: bcffaad
Author: dancollins34 <da...@gmail.com>
Authored: Sat Feb 3 17:24:44 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:28:54 2018 -0500

----------------------------------------------------------------------
 .../jython/gremlin_python/driver/driver_remote_connection.py    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/545f3bf8/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
index 1f08e2b..d447cbd 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
@@ -63,13 +63,12 @@ class DriverRemoteConnection(RemoteConnection):
         def cb(f):
             try:
                 result_set = f.result()
-            except Exception as e:
-                future.set_exception(e)
-            else:
                 results = result_set.all().result()
                 side_effects = RemoteTraversalSideEffects(result_set.request_id,
                                                           self._client)
                 future.set_result(RemoteTraversal(iter(results), side_effects))
+            except Exception as e:
+                future.set_exception(e)
 
         future_result_set.add_done_callback(cb)
         return future


[33/50] tinkerpop git commit: Force travis rebuild CTR

Posted by dk...@apache.org.
Force travis rebuild CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: 016111e5d689d538de6ca60062cfb06a43474a5d
Parents: ab566c9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 22 18:36:36 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 22 18:36:36 2018 -0500

----------------------------------------------------------------------

----------------------------------------------------------------------



[14/50] tinkerpop git commit: JavaScript GLV: include Barrier and Pop in test traversal context

Posted by dk...@apache.org.
JavaScript GLV: include Barrier and Pop in test traversal context


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

Branch: refs/heads/TINKERPOP-1777
Commit: 2af60402d49957c3bd28e515afb981b68c4baafa
Parents: 1e38023
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Wed Feb 14 16:18:24 2018 +0100
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../javascript/gremlin-javascript/test/cucumber/feature-steps.js   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2af60402/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 12bc835..9e12818 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -173,6 +173,7 @@ function getSandbox(g, parameters) {
   const sandbox = {
     g: g,
     __: __,
+    Barrier: traversalModule.barrier,
     Cardinality: traversalModule.cardinality,
     Column: traversalModule.column,
     Direction: {
@@ -183,6 +184,7 @@ function getSandbox(g, parameters) {
     Order: traversalModule.order,
     P: traversalModule.P,
     Pick: traversalModule.pick,
+    Pop: traversalModule.pop,
     Scope: traversalModule.scope,
     Operator: traversalModule.operator,
     T: traversalModule.t,


[42/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'


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

Branch: refs/heads/TINKERPOP-1777
Commit: 614c346d672ebc3c445d0c3d52dd7dd34fc18cf8
Parents: eaa1402 072f112
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 24 16:00:58 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 24 16:00:58 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/release.asciidoc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/614c346d/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------


[40/50] tinkerpop git commit: Minor fixes to Gherkin test docs CTR

Posted by dk...@apache.org.
Minor fixes to Gherkin test docs CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: eaa14028735efbbfb16276e970034106e12c4953
Parents: 90e40e3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 24 11:52:44 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 24 11:52:44 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eaa14028/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 756a522..f5a121c 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -177,8 +177,7 @@ Test cases for the Gremlin Language currently requires that the newly developed
 
 1. As a test written in Java in the `gremlin-test` module within the subpackages of
 `org.apache.tinkerpop.gremlin.process.traversal.step`
-2. As a test written in Groovy in the `gremlin-groovy-test` module within the same subpackage structure as `gremlin-test`
-3. As a test written in Gherkin in the `gremlin-test` module in the `/features` subdirectory
+2. As a test written in Gherkin in the `gremlin-test` module in the `/features` subdirectory
 
 When writing a Java test case for a Gremlin step, be sure to use the following conventions.
 
@@ -195,14 +194,11 @@ When writing a Java test case for a Gremlin step, be sure to use the following c
 ** `checkResults(Arrays.asList("marko","josh"), traversal)`
 ** `checkMap(new HashMap<String,Long>() {{ put("marko",1l); }}, traversal.next())`
 
-Groovy tests are implemented by extending the Java test and implementing the abstract method that produces the
-traversal. Simply follow existing patterns in those tests - they are self-evident.
-
 Gherkin tests follow some important conventions and have a sub-language that must be adhered to for the tests to
 function properly. Note that Gherkin tests are designed to support the testing of GLVs and at some point will likely
-replace the Java tests (Groovy tests have already been removed in 3.3.x). If a new Java test is added and an associated
-Gherkin tests is not, the overall build will fail the `FeatureCoverageTest` of `gremlin-test` which validates that all
-tests written in Java are also implemented in Gherkin.
+replace the Java tests. If a new Java test is added and an associated Gherkin tests is not, the overall build will
+fail the `FeatureCoverageTest` of `gremlin-test` which validates that all tests written in Java are also implemented
+in Gherkin.
 
 The basic syntax of a Gherkin test is as follows:
 


[09/50] tinkerpop git commit: TINKERPOP-1857 Temporarily ignore test failures with .net GLV tests

Posted by dk...@apache.org.
TINKERPOP-1857 Temporarily ignore test failures with .net GLV tests


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

Branch: refs/heads/TINKERPOP-1777
Commit: 10f29cbe94424a03f1710695fcd396cbc0ae95ff
Parents: bdd5e4c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 9 09:52:37 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                | 24 ++++++++++++++++++--
 .../Gherkin/IgnoreException.cs                  |  6 ++++-
 2 files changed, 27 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10f29cbe/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 9cb3cf0..69af86f 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -37,8 +37,28 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
 {
     public class GherkinTestRunner
     {
-        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios =
-            new Dictionary<string, IgnoreReason>();
+        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
+            { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
+        };
         
         private static class Keywords
         {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10f29cbe/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index ae236c7..0179994 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -43,6 +43,9 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                 case IgnoreReason.LambdaNotSupported:
                     reasonSuffix = " because lambdas are not supported in Gremlin.NET";
                     break;
+                case IgnoreReason.NeedsFurtherInvestigation:
+                    reasonSuffix = " as further investigation is required";
+                    break;
             }
             return $"Scenario ignored" + reasonSuffix;
         }
@@ -50,6 +53,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
     
     public enum IgnoreReason
     {
-        LambdaNotSupported
+        LambdaNotSupported,
+        NeedsFurtherInvestigation
     }
 }
\ No newline at end of file


[18/50] tinkerpop git commit: TINKERPOP-1357 Added pageRank step to centrality recipes

Posted by dk...@apache.org.
TINKERPOP-1357 Added pageRank step to centrality recipes

While not really a "recipe", it's worth letting people know who are reading about centrality that there is an easy way to do PageRank calculations. CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: bcffaad0a8064f549d4bc509884ac763b6542814
Parents: 7f39b18
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 15 09:44:12 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 15 09:46:37 2018 -0500

----------------------------------------------------------------------
 docs/src/recipes/centrality.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bcffaad0/docs/src/recipes/centrality.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/centrality.asciidoc b/docs/src/recipes/centrality.asciidoc
index 9a21636..1a3927e 100644
--- a/docs/src/recipes/centrality.asciidoc
+++ b/docs/src/recipes/centrality.asciidoc
@@ -174,3 +174,17 @@ traversal from taking longer than one hundred milliseconds to execute (the previ
 than that). While the answer provided with the `timeLimit()` is not the absolute ranking, it does provide a relative
 ranking that closely matches the absolute one. The use of `timeLimit()` in certain algorithms (e.g. recommendations)
 can shorten the time required to get a reasonable and usable result.
+
+[[pagerank-centrality]]
+=== PageRank Centrality
+
+While not technically a recipe, it's worth noting here in the "Centrality Section" that
+link:https://en.wikipedia.org/wiki/PageRank[PageRank] centrality can be calculated with Gremlin with the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#pagerank-step[pageRank()]-step which is designed to work with
+`GraphComputer` (OLAP) based traversals.
+
+[gremlin-groovy,modern]
+----
+g = graph.traversal().withComputer()
+g.V().pageRank().by('pageRank').values('pageRank')
+----


[34/50] tinkerpop git commit: Merge branch 'TINKERPOP-1872' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1872' into tp32

Conflicts:
	CHANGELOG.asciidoc


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

Branch: refs/heads/TINKERPOP-1777
Commit: 3df6c5806a585e8e1c381e4043338110ef8b4517
Parents: d42d54d 0f0d97a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 23 07:00:39 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 23 07:00:39 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../process/computer/GraphComputerTest.java     | 70 ++++++++++++++++
 .../spark/process/computer/SparkMessenger.java  |  2 +-
 .../process/computer/SparkMessengerTest.java    | 86 ++++++++++++++++++++
 4 files changed, 158 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3df6c580/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index f1519b6,4d93912..1ed018c
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -31,7 -27,7 +31,8 @@@ image::https://raw.githubusercontent.co
  * Removed hardcoded expectation in metrics serialization test suite as different providers may have different outputs.
  * Added `IndexedTraverserSet` which indexes on the value of a `Traverser` thus improving performance when used.
  * Utilized `IndexedTraverserSet` in `TraversalVertexProgram` to avoid extra iteration when doing `Vertex` lookups.
 +* Fixed a bug in Gremlin Console which prevented handling of `gremlin.sh` flags that had an "=" between the flag and its arguments.
+ * Fixed bug where `SparkMessenger` was not applying the `edgeFunction` from `MessageScope`.
  * Fixed a bug in `ComputerAwareStep` that didn't handle `reset()` properly and thus occasionally produced some extra traversers.
  
  [[release-3-2-7]]


[43/50] tinkerpop git commit: Bump to 3.4.0-SNAPSHOT CTR

Posted by dk...@apache.org.
Bump to 3.4.0-SNAPSHOT CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: 0c10921f1d78e2e43e53bec37fe2e077d9bcaa9c
Parents: 614c346
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 08:43:04 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 08:43:04 2018 -0500

----------------------------------------------------------------------
 giraph-gremlin/pom.xml                                  | 2 +-
 gremlin-archetype/gremlin-archetype-dsl/pom.xml         | 2 +-
 gremlin-archetype/gremlin-archetype-server/pom.xml      | 2 +-
 gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml | 2 +-
 gremlin-archetype/pom.xml                               | 2 +-
 gremlin-console/pom.xml                                 | 2 +-
 gremlin-core/pom.xml                                    | 2 +-
 gremlin-dotnet/pom.xml                                  | 2 +-
 gremlin-dotnet/src/pom.xml                              | 2 +-
 gremlin-dotnet/test/pom.xml                             | 2 +-
 gremlin-driver/pom.xml                                  | 2 +-
 gremlin-groovy/pom.xml                                  | 2 +-
 gremlin-javascript/pom.xml                              | 2 +-
 gremlin-python/pom.xml                                  | 2 +-
 gremlin-server/pom.xml                                  | 2 +-
 gremlin-shaded/pom.xml                                  | 2 +-
 gremlin-test/pom.xml                                    | 2 +-
 gremlin-tools/gremlin-benchmark/pom.xml                 | 2 +-
 gremlin-tools/gremlin-coverage/pom.xml                  | 2 +-
 gremlin-tools/gremlin-io-test/pom.xml                   | 2 +-
 gremlin-tools/pom.xml                                   | 2 +-
 hadoop-gremlin/pom.xml                                  | 2 +-
 neo4j-gremlin/pom.xml                                   | 2 +-
 pom.xml                                                 | 2 +-
 spark-gremlin/pom.xml                                   | 2 +-
 tinkergraph-gremlin/pom.xml                             | 2 +-
 26 files changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/giraph-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/giraph-gremlin/pom.xml b/giraph-gremlin/pom.xml
index 5155745..8cf3f5b 100644
--- a/giraph-gremlin/pom.xml
+++ b/giraph-gremlin/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>giraph-gremlin</artifactId>
     <name>Apache TinkerPop :: Giraph Gremlin</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-archetype/gremlin-archetype-dsl/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-archetype/gremlin-archetype-dsl/pom.xml b/gremlin-archetype/gremlin-archetype-dsl/pom.xml
index d06c082..99994e6 100644
--- a/gremlin-archetype/gremlin-archetype-dsl/pom.xml
+++ b/gremlin-archetype/gremlin-archetype-dsl/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>gremlin-archetype</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>gremlin-archetype-dsl</artifactId>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-archetype/gremlin-archetype-server/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-archetype/gremlin-archetype-server/pom.xml b/gremlin-archetype/gremlin-archetype-server/pom.xml
index 1dd42de..7addc03 100644
--- a/gremlin-archetype/gremlin-archetype-server/pom.xml
+++ b/gremlin-archetype/gremlin-archetype-server/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>gremlin-archetype</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>gremlin-archetype-server</artifactId>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml b/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
index 1088574..dc2c591 100644
--- a/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
+++ b/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>gremlin-archetype</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>gremlin-archetype-tinkergraph</artifactId>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-archetype/pom.xml b/gremlin-archetype/pom.xml
index 1cdef96..137808f 100644
--- a/gremlin-archetype/pom.xml
+++ b/gremlin-archetype/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <artifactId>tinkerpop</artifactId>
         <groupId>org.apache.tinkerpop</groupId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>gremlin-archetype</artifactId>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-console/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-console/pom.xml b/gremlin-console/pom.xml
index 365fc90..d7f14ae 100644
--- a/gremlin-console/pom.xml
+++ b/gremlin-console/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <artifactId>tinkerpop</artifactId>
         <groupId>org.apache.tinkerpop</groupId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-console</artifactId>
     <name>Apache TinkerPop :: Gremlin Console</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-core/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-core/pom.xml b/gremlin-core/pom.xml
index 3e32f3e..fb4d2ee 100644
--- a/gremlin-core/pom.xml
+++ b/gremlin-core/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-core</artifactId>
     <name>Apache TinkerPop :: Gremlin Core</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-dotnet/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/pom.xml b/gremlin-dotnet/pom.xml
index 0218fa9..ec2066a 100644
--- a/gremlin-dotnet/pom.xml
+++ b/gremlin-dotnet/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-dotnet</artifactId>
     <name>Apache TinkerPop :: Gremlin.Net</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-dotnet/src/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/pom.xml b/gremlin-dotnet/src/pom.xml
index b2f8df3..b8137af 100644
--- a/gremlin-dotnet/src/pom.xml
+++ b/gremlin-dotnet/src/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>gremlin-dotnet</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-dotnet-source</artifactId>
     <name>Apache TinkerPop :: Gremlin.Net - Source</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-dotnet/test/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml
index 99dd72e..05d0f0f 100644
--- a/gremlin-dotnet/test/pom.xml
+++ b/gremlin-dotnet/test/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>gremlin-dotnet</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-dotnet-tests</artifactId>
     <name>Apache TinkerPop :: Gremlin.Net - Tests</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-driver/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-driver/pom.xml b/gremlin-driver/pom.xml
index 0c2fcec..5bb6ac0 100644
--- a/gremlin-driver/pom.xml
+++ b/gremlin-driver/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-driver</artifactId>
     <name>Apache TinkerPop :: Gremlin Driver</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-groovy/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-groovy/pom.xml b/gremlin-groovy/pom.xml
index df953d0..9893f7b 100644
--- a/gremlin-groovy/pom.xml
+++ b/gremlin-groovy/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-groovy</artifactId>
     <name>Apache TinkerPop :: Gremlin Groovy</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-javascript/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-javascript/pom.xml b/gremlin-javascript/pom.xml
index 8868f85..78507a6 100644
--- a/gremlin-javascript/pom.xml
+++ b/gremlin-javascript/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-javascript</artifactId>
     <name>Apache TinkerPop :: Gremlin Javascript</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-python/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index b21f668..8a71b1f 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-python</artifactId>
     <name>Apache TinkerPop :: Gremlin Python</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-server/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-server/pom.xml b/gremlin-server/pom.xml
index 5f8fff3..5a257b5 100644
--- a/gremlin-server/pom.xml
+++ b/gremlin-server/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-server</artifactId>
     <name>Apache TinkerPop :: Gremlin Server</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-shaded/pom.xml b/gremlin-shaded/pom.xml
index db69be3..c35608d 100644
--- a/gremlin-shaded/pom.xml
+++ b/gremlin-shaded/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-shaded</artifactId>
     <name>Apache TinkerPop :: Gremlin Shaded</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-test/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-test/pom.xml b/gremlin-test/pom.xml
index 0681d0e..2066c5a 100644
--- a/gremlin-test/pom.xml
+++ b/gremlin-test/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-test</artifactId>
     <name>Apache TinkerPop :: Gremlin Test</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-tools/gremlin-benchmark/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-benchmark/pom.xml b/gremlin-tools/gremlin-benchmark/pom.xml
index 43a8f3c..f3c4c20 100644
--- a/gremlin-tools/gremlin-benchmark/pom.xml
+++ b/gremlin-tools/gremlin-benchmark/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <artifactId>gremlin-tools</artifactId>
         <groupId>org.apache.tinkerpop</groupId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>gremlin-benchmark</artifactId>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-tools/gremlin-coverage/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-coverage/pom.xml b/gremlin-tools/gremlin-coverage/pom.xml
index 979fc48..79cf987 100644
--- a/gremlin-tools/gremlin-coverage/pom.xml
+++ b/gremlin-tools/gremlin-coverage/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <artifactId>gremlin-tools</artifactId>
         <groupId>org.apache.tinkerpop</groupId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-coverage</artifactId>
     <name>Apache TinkerPop :: Gremlin Coverage</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-tools/gremlin-io-test/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/pom.xml b/gremlin-tools/gremlin-io-test/pom.xml
index 49b4e83..3d42965 100644
--- a/gremlin-tools/gremlin-io-test/pom.xml
+++ b/gremlin-tools/gremlin-io-test/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <artifactId>gremlin-tools</artifactId>
         <groupId>org.apache.tinkerpop</groupId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>gremlin-io-test</artifactId>
     <name>Apache TinkerPop :: Gremlin IO Test</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/gremlin-tools/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-tools/pom.xml b/gremlin-tools/pom.xml
index 615ea50..a8050d5 100644
--- a/gremlin-tools/pom.xml
+++ b/gremlin-tools/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <artifactId>tinkerpop</artifactId>
         <groupId>org.apache.tinkerpop</groupId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>gremlin-tools</artifactId>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/hadoop-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/pom.xml b/hadoop-gremlin/pom.xml
index 1927309..210a0ec 100644
--- a/hadoop-gremlin/pom.xml
+++ b/hadoop-gremlin/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>hadoop-gremlin</artifactId>
     <name>Apache TinkerPop :: Hadoop Gremlin</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/neo4j-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/pom.xml b/neo4j-gremlin/pom.xml
index 139b378..ad36fef 100644
--- a/neo4j-gremlin/pom.xml
+++ b/neo4j-gremlin/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>neo4j-gremlin</artifactId>
     <name>Apache TinkerPop :: Neo4j Gremlin</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index aafa895..f6c7a01 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@ limitations under the License.
     </parent>
     <groupId>org.apache.tinkerpop</groupId>
     <artifactId>tinkerpop</artifactId>
-    <version>3.3.2-SNAPSHOT</version>
+    <version>3.4.0-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Apache TinkerPop</name>
     <description>A Graph Computing Framework</description>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/spark-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/spark-gremlin/pom.xml b/spark-gremlin/pom.xml
index 906b7d2..5050ee0 100644
--- a/spark-gremlin/pom.xml
+++ b/spark-gremlin/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>spark-gremlin</artifactId>
     <name>Apache TinkerPop :: Spark Gremlin</name>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0c10921f/tinkergraph-gremlin/pom.xml
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/pom.xml b/tinkergraph-gremlin/pom.xml
index 88dcccf..6989c83 100644
--- a/tinkergraph-gremlin/pom.xml
+++ b/tinkergraph-gremlin/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.tinkerpop</groupId>
         <artifactId>tinkerpop</artifactId>
-        <version>3.3.2-SNAPSHOT</version>
+        <version>3.4.0-SNAPSHOT</version>
     </parent>
     <artifactId>tinkergraph-gremlin</artifactId>
     <name>Apache TinkerPop :: TinkerGraph Gremlin</name>


[46/50] tinkerpop git commit: Updated branching strategy now that tp33 is present CTR

Posted by dk...@apache.org.
Updated branching strategy now that tp33 is present CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: 1a857da8a09bb5289296493f21ba89b581e77882
Parents: 072f112
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 08:51:18 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 08:51:18 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a857da8/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index b44de9a..c8b5559 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -65,10 +65,11 @@ TinkerPop has several release branches:
 * `tp30` - 3.0.x (no longer maintained)
 * `tp31` - 3.1.x (no longer maintained)
 * `tp32` - 3.2.x (bug fixes and documentation updates only)
-* `master` - 3.3.x
+* `tp33` - 3.3.x (current development)
+* `master` - 3.4.x (future development)
 
-Changes to `tp32` should merge to `master`. Please read more about this process in the <<pull-requests, Pull Requests>>
-section.
+Changes to `tp32` should merge to `tp33` and then `tp33` to `master`. Please read more about this process in the
+<<pull-requests, Pull Requests>> section.
 
 Other branches may be created for collaborating on features or for RFC's that other developers may want to inspect.
 It is suggested that the JIRA issue ID be used as the prefix, since that triggers certain automation, and it provides a


[20/50] tinkerpop git commit: TINKERPOP-1726 Added idleReadLimit and idleWriteLimit for Gremlin Server

Posted by dk...@apache.org.
TINKERPOP-1726 Added idleReadLimit and idleWriteLimit for Gremlin Server

This enables Gremlin Server to periodically ping clients and auto-close zombie connections when a client disappears without issuing a close.


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

Branch: refs/heads/TINKERPOP-1777
Commit: 10ab33410862ccb935e911b028c27f4cd835b70f
Parents: bcffaad
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 16 16:19:56 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 17 06:50:46 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc | 13 ++++---
 .../upgrade/release-3.2.x-incubating.asciidoc   | 15 ++++++++
 .../driver/handler/WebSocketClientHandler.java  |  5 ++-
 gremlin-server/conf/gremlin-server-classic.yaml |  2 ++
 .../conf/gremlin-server-modern-py.yaml          |  2 ++
 .../conf/gremlin-server-modern-readonly.yaml    |  2 ++
 gremlin-server/conf/gremlin-server-modern.yaml  |  2 ++
 gremlin-server/conf/gremlin-server-neo4j.yaml   |  2 ++
 gremlin-server/conf/gremlin-server-secure.yaml  |  2 ++
 gremlin-server/conf/gremlin-server-spark.yaml   |  2 ++
 gremlin-server/conf/gremlin-server.yaml         |  2 ++
 .../gremlin/server/AbstractChannelizer.java     | 11 ++++--
 .../tinkerpop/gremlin/server/Channelizer.java   | 17 +++++++++
 .../tinkerpop/gremlin/server/Settings.java      | 16 ++++++++-
 .../server/channel/WebSocketChannelizer.java    | 11 ++++++
 .../server/channel/WsAndHttpChannelizer.java    | 28 +++++++--------
 .../server/handler/OpSelectorHandler.java       | 35 +++++++++++++++++++
 .../handler/WsAndHttpChannelizerHandler.java    | 11 ++++--
 .../server/GremlinServerIntegrateTest.java      | 36 +++++++++++++++++++-
 .../gremlin/util/Log4jRecordingAppender.java    |  5 +--
 .../util/Log4jRecordingAppenderTest.java        |  2 +-
 .../remote/gremlin-server-integration.yaml      |  2 ++
 .../server/gremlin-server-integration.yaml      |  2 ++
 .../server/gremlin-server-performance.yaml      |  2 ++
 25 files changed, 198 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f1519b6..f516f7b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
+* Added `idleReadLimit` and `idleWriteLimit` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` construction by the builder.
 * Improved error messaging for failed serialization and deserialization of request/response messages.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 4e4f190..2413bdb 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1073,7 +1073,8 @@ The following table describes the various configuration options that Gremlin Ser
 |graphs |A `Map` of `Graph` configuration files where the key of the `Map` becomes the name to which the `Graph` will be bound and the value is the file name of a `Graph` configuration file. |_none_
 |gremlinPool |The number of "Gremlin" threads available to execute actual scripts in a `ScriptEngine`. This pool represents the workers available to handle blocking operations in Gremlin Server. When set to `0`, Gremlin Server will use the value provided by `Runtime.availableProcessors()`. |0
 |host |The name of the host to bind the server to. |localhost
-|useEpollEventLoop |try to use epoll event loops (works only on Linux os) instead of netty NIO. |false
+|idleReadLimit |Time in milliseconds that the server will allow a channel to not receive requests from a client before it automatically closes. If enabled, the value provided should typically exceed the amount of time given to `idleWriteLimit`. Set this value to `0` to disable this feature. |0
+|idleWriteLimit |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the {@link #idleReadLimit} and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleReadLimit`. Set this value to `0` to disable this feature. |0
 |maxAccumulationBufferComponents |Maximum number of request components that can be aggregated for a message. |1024
 |maxChunkSize |The maximum length of the content or each chunk.  If the content length exceeds this value, the transfer encoding of the decoded request will be converted to 'chunked' and the content will be split into multiple `HttpContent` objects.  If the transfer encoding of the HTTP request is 'chunked' already, each chunk will be split into smaller chunks if the length of the chunk exceeds this value. |8192
 |maxContentLength |The maximum length of the aggregated content for a message.  Works in concert with `maxChunkSize` where chunked requests are accumulated back into a single message.  A request exceeding this size will return a `413 - Request Entity Too Large` status code.  A response exceeding this size will raise an internal exception. |65536
@@ -1121,6 +1122,7 @@ The following table describes the various configuration options that Gremlin Ser
 |strictTransactionManagement |Set to `true` to require `aliases` to be submitted on every requests, where the `aliases` become the scope of transaction management. |false
 |threadPoolBoss |The number of threads available to Gremlin Server for accepting connections. Should always be set to `1`. |1
 |threadPoolWorker |The number of threads available to Gremlin Server for processing non-blocking reads and writes. |1
+|useEpollEventLoop |try to use epoll event loops (works only on Linux os) instead of netty NIO. |false
 |writeBufferHighWaterMark | If the number of bytes in the network send buffer exceeds this value then the channel is no longer writeable, accepting no additional writes until buffer is drained and the `writeBufferLowWaterMark` is met. |65536
 |writeBufferLowWaterMark | Once the number of bytes queued in the network send buffer exceeds the `writeBufferHighWaterMark`, the channel will not become writeable again until the buffer is drained and it drops below this value. |65536
 |=========================================================
@@ -1160,8 +1162,7 @@ The `SessionOpProcessor` provides a way to interact with Gremlin Server over a <
 |sessionTimeout |Time in milliseconds before a session will time out. |28800000
 |=========================================================
 
-StandardOpProcessor
-++++++++++++++++++
+===== StandardOpProcessor
 
 The `StandardOpProcessor` provides a way to interact with Gremlin Server without use of sessions and is the default
 method for processing script evaluation requests.
@@ -1593,8 +1594,10 @@ The following sections define best practices for working with Gremlin Server.
 
 image:gremlin-handdrawn.png[width=120,float=right] Tuning Gremlin Server for a particular environment may require some simple trial-and-error, but the following represent some basic guidelines that might be useful:
 
-* Gremlin Server defaults to a very modest maximum heap size.  Consider increasing this value for non-trivial uses.  Maximum heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
-* When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a maximum of `2*number of cores`.
+* Gremlin Server defaults to a very modest maximum heap size.  Consider increasing this value for non-trivial uses.
+Maximum heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
+* When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a
+maximum of `2*number of cores`.
 * The "right" size of the `gremlinPool` setting is somewhat dependent on the type of scripts that will be processed
 by Gremlin Server.  As requests arrive to Gremlin Server they are decoded and queued to be processed by threads in
 this pool.  When this pool is exhausted of threads, Gremlin Server will continue to accept incoming requests, but

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/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 00a6e83..f623127 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -27,6 +27,21 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 Please see the link:https://github.com/apache/tinkerpop/blob/3.2.8/CHANGELOG.asciidoc#release-3-2-8[changelog] for a complete list of all the modifications that are part of this release.
 
+=== Upgrading for Users
+
+==== Improved Connection Monitoring
+
+Gremlin Server now has two new settings: `idleReadLimit` and `idleWriteLimit`. The `idleWriteLimit` tells Gremlin
+Server how long it should wait between writes to a client before it issues a "ping" to that client to see if it is
+still present. The `idleReadLimit` represents how long Gremlin Server should wait between requests from a client before
+it closes the connection on the server side. By default, these two configurations are set to zero, meaning that they
+are both disabled.
+
+This change should help to alleviate issues where connections are left open on the server longer than they should be
+by clients that might mysteriously disappear without properly closing their connections.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1726[TINKERPOP-1726]
+
 === Upgrading for Providers
 
 ==== Graph System Providers

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java
index c63d790..0a1f2f7 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/WebSocketClientHandler.java
@@ -26,6 +26,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
 import io.netty.handler.codec.http.FullHttpResponse;
 import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame;
 import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
+import io.netty.handler.codec.http.websocketx.PingWebSocketFrame;
 import io.netty.handler.codec.http.websocketx.PongWebSocketFrame;
 import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
 import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker;
@@ -85,7 +86,9 @@ public final class WebSocketClientHandler extends SimpleChannelInboundHandler<Ob
         final WebSocketFrame frame = (WebSocketFrame) msg;
         if (frame instanceof TextWebSocketFrame) {
             ctx.fireChannelRead(frame.retain(2));
-        } else if (frame instanceof PongWebSocketFrame) {
+        } else if (frame instanceof PingWebSocketFrame) {
+            ctx.writeAndFlush(new PongWebSocketFrame());
+        }else if (frame instanceof PongWebSocketFrame) {
             logger.debug("Received response from keep-alive request");
         } else if (frame instanceof BinaryWebSocketFrame) {
             ctx.fireChannelRead(frame.retain(2));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server-classic.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-classic.yaml b/gremlin-server/conf/gremlin-server-classic.yaml
index b56960d..6a7f3f4 100644
--- a/gremlin-server/conf/gremlin-server-classic.yaml
+++ b/gremlin-server/conf/gremlin-server-classic.yaml
@@ -36,6 +36,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server-modern-py.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-modern-py.yaml b/gremlin-server/conf/gremlin-server-modern-py.yaml
index a04681f..726890d 100644
--- a/gremlin-server/conf/gremlin-server-modern-py.yaml
+++ b/gremlin-server/conf/gremlin-server-modern-py.yaml
@@ -51,6 +51,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 threadPoolBoss: 1
 maxInitialLineLength: 4096
 maxHeaderSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server-modern-readonly.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-modern-readonly.yaml b/gremlin-server/conf/gremlin-server-modern-readonly.yaml
index c2073ea..6840e18 100644
--- a/gremlin-server/conf/gremlin-server-modern-readonly.yaml
+++ b/gremlin-server/conf/gremlin-server-modern-readonly.yaml
@@ -36,6 +36,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server-modern.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-modern.yaml b/gremlin-server/conf/gremlin-server-modern.yaml
index 16eba68..6ec3e23 100644
--- a/gremlin-server/conf/gremlin-server-modern.yaml
+++ b/gremlin-server/conf/gremlin-server-modern.yaml
@@ -36,6 +36,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server-neo4j.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-neo4j.yaml b/gremlin-server/conf/gremlin-server-neo4j.yaml
index 8d91374..a1a32ca 100644
--- a/gremlin-server/conf/gremlin-server-neo4j.yaml
+++ b/gremlin-server/conf/gremlin-server-neo4j.yaml
@@ -55,6 +55,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server-secure.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-secure.yaml b/gremlin-server/conf/gremlin-server-secure.yaml
index 197e3a7..771f31b 100644
--- a/gremlin-server/conf/gremlin-server-secure.yaml
+++ b/gremlin-server/conf/gremlin-server-secure.yaml
@@ -58,6 +58,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server-spark.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-spark.yaml b/gremlin-server/conf/gremlin-server-spark.yaml
index 5ff7cc8..747845a 100644
--- a/gremlin-server/conf/gremlin-server-spark.yaml
+++ b/gremlin-server/conf/gremlin-server-spark.yaml
@@ -68,6 +68,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/conf/gremlin-server.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server.yaml b/gremlin-server/conf/gremlin-server.yaml
index 71d1d91..6b61d4b 100644
--- a/gremlin-server/conf/gremlin-server.yaml
+++ b/gremlin-server/conf/gremlin-server.yaml
@@ -45,6 +45,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index c4d8398..0bc4e00 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@ -23,6 +23,7 @@ import io.netty.handler.ssl.SslContext;
 import io.netty.handler.ssl.SslContextBuilder;
 import io.netty.handler.ssl.SslProvider;
 import io.netty.handler.ssl.util.SelfSignedCertificate;
+import io.netty.handler.timeout.IdleStateHandler;
 import org.apache.tinkerpop.gremlin.driver.MessageSerializer;
 import org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV1d0;
 import org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0;
@@ -98,6 +99,7 @@ public abstract class AbstractChannelizer extends ChannelInitializer<SocketChann
 
     protected final Map<String, MessageSerializer> serializers = new HashMap<>();
 
+    private IdleStateHandler idleStateHandler;
     private OpSelectorHandler opSelectorHandler;
     private OpExecutorHandler opExecutorHandler;
     private IteratorHandler iteratorHandler;
@@ -138,7 +140,7 @@ public abstract class AbstractChannelizer extends ChannelInitializer<SocketChann
         authenticator = createAuthenticator(settings.authentication);
 
         // these handlers don't share any state and can thus be initialized once per pipeline
-        opSelectorHandler = new OpSelectorHandler(settings, graphManager, gremlinExecutor, scheduledExecutorService);
+        opSelectorHandler = new OpSelectorHandler(settings, graphManager, gremlinExecutor, scheduledExecutorService, this);
         opExecutorHandler = new OpExecutorHandler(settings, graphManager, gremlinExecutor, scheduledExecutorService);
         iteratorHandler = new IteratorHandler(settings);
     }
@@ -147,7 +149,12 @@ public abstract class AbstractChannelizer extends ChannelInitializer<SocketChann
     public void initChannel(final SocketChannel ch) throws Exception {
         final ChannelPipeline pipeline = ch.pipeline();
 
-        if (sslContext.isPresent()) pipeline.addLast(PIPELINE_SSL, sslContext.get().newHandler(ch.alloc()));
+        sslContext.ifPresent(sslContext -> pipeline.addLast(PIPELINE_SSL, sslContext.newHandler(ch.alloc())));
+
+        // checks for no activity on a channel and triggers an event that is consumed by the OpSelectorHandler
+        // and either closes the connection or sends a ping to see if the client is still alive
+        if (supportsIdleMonitor())
+            pipeline.addLast(new IdleStateHandler((int) (settings.idleReadLimit / 1000), (int) (settings.idleWriteLimit / 1000),0));
 
         // the implementation provides the method by which Gremlin Server will process requests.  the end of the
         // pipeline must decode to an incoming RequestMessage instances and encode to a outgoing ResponseMessage

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
index fd7821e..15fb7d3 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
@@ -36,4 +36,21 @@ public interface Channelizer extends ChannelHandler {
      * This method is called just after the {@code Channelizer} is initialized.
      */
     public void init(final ServerGremlinExecutor<EventLoopGroup> serverGremlinExecutor);
+
+    /**
+     * Create a message to send to seemingly dead clients to see if they respond back. The message sent will be
+     * dependent on the implementation. For example, a websocket implementation would create a "ping" message.
+     * This method will only be used if {@link #supportsIdleMonitor()} is {@code true}.
+     */
+    public default Object createIdleDetectionMessage() {
+        return null;
+    }
+
+    /**
+     * Determines if the channelizer supports a method for keeping the connection alive and auto-closing zombie
+     * channels.
+     */
+    public default boolean supportsIdleMonitor() {
+        return false;
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/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 d0bd8fd..75466ca 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
@@ -31,7 +31,6 @@ import org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer;
 import org.apache.tinkerpop.gremlin.server.handler.AbstractAuthenticationHandler;
 import org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager;
 import info.ganglia.gmetric4j.gmetric.GMetric;
-import org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor;
 import org.apache.tinkerpop.gremlin.server.util.LifeCycleHook;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.yaml.snakeyaml.TypeDescription;
@@ -165,6 +164,21 @@ public class Settings {
     public int writeBufferLowWaterMark = 1024 * 32;
 
     /**
+     * Time in milliseconds that the server will allow a channel to not receive requests from a client before it
+     * automatically closes. If enabled, the value provided should typically exceed the amount of time given to
+     * {@link #idleWriteLimit}. Set this value to 0 to disable this feature.
+     */
+    public long idleReadLimit = 0;
+
+    /**
+     * Time in milliseconds that the server will allow a channel to not send responses to a client before it sends
+     * a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will
+     * thus reset the {@link #idleReadLimit} and keep the channel open. If enabled, this number should be smaller than
+     * the value provided to the {@link #idleReadLimit}. Set this value to 0 to disable this feature.
+     */
+    public long idleWriteLimit = 0;
+
+    /**
      * If set to {@code true} the {@code aliases} option is required on requests and Gremlin Server will use that
      * information to control which {@link Graph} instances are transaction managed for that request.  If this
      * setting is false (which is the default), specification of {@code aliases} is not required and Gremlin

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
index af41cc6..a6ec20b 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
@@ -19,6 +19,7 @@
 package org.apache.tinkerpop.gremlin.server.channel;
 
 import io.netty.channel.EventLoopGroup;
+import io.netty.handler.codec.http.websocketx.PingWebSocketFrame;
 import org.apache.tinkerpop.gremlin.server.AbstractChannelizer;
 import org.apache.tinkerpop.gremlin.server.auth.AllowAllAuthenticator;
 import org.apache.tinkerpop.gremlin.server.handler.AbstractAuthenticationHandler;
@@ -113,6 +114,16 @@ public class WebSocketChannelizer extends AbstractChannelizer {
             pipeline.addLast(PIPELINE_AUTHENTICATOR, authenticationHandler);
     }
 
+    @Override
+    public boolean supportsIdleMonitor() {
+        return true;
+    }
+
+    @Override
+    public Object createIdleDetectionMessage() {
+        return new PingWebSocketFrame();
+    }
+
     private AbstractAuthenticationHandler instantiateAuthenticationHandler(final Settings.AuthenticationSettings authSettings) {
         final String authenticationHandler = authSettings.authenticationHandler;
         if (authenticationHandler == null) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
index 58885fb..e415887 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
@@ -18,32 +18,20 @@
  */
 package org.apache.tinkerpop.gremlin.server.channel;
 
-import io.netty.channel.ChannelInboundHandlerAdapter;
 import io.netty.channel.ChannelPipeline;
 import io.netty.channel.EventLoopGroup;
-import io.netty.handler.codec.http.HttpObjectAggregator;
-import io.netty.handler.codec.http.HttpRequestDecoder;
-import io.netty.handler.codec.http.HttpResponseEncoder;
-import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
-import io.netty.handler.logging.LogLevel;
-import io.netty.handler.logging.LoggingHandler;
 import org.apache.tinkerpop.gremlin.server.AbstractChannelizer;
 import org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler;
 import org.apache.tinkerpop.gremlin.server.handler.WsAndHttpChannelizerHandler;
 import org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor;
-import org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
- *A channelizer for port unification with websockets and http
- *@author Keith Lohnes lohnesk@gmail.com
+ * A channelizer for port unification with websockets and http
+ *
+ * @author Keith Lohnes lohnesk@gmail.com
  */
-
 public class WsAndHttpChannelizer extends AbstractChannelizer {
 
-    private static final Logger logger = LoggerFactory.getLogger(WsAndHttpChannelizer.class);
-
     private WsAndHttpChannelizerHandler handler;
 
     @Override
@@ -58,4 +46,14 @@ public class WsAndHttpChannelizer extends AbstractChannelizer {
         handler.configure(pipeline);
         pipeline.addAfter(PIPELINE_HTTP_REQUEST_DECODER, "WsAndHttpChannelizerHandler", handler);
     }
+
+    @Override
+    public boolean supportsIdleMonitor() {
+        return handler.getWsChannelizer().supportsIdleMonitor();
+    }
+
+    @Override
+    public Object createIdleDetectionMessage() {
+        return handler.getWsChannelizer().createIdleDetectionMessage();
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
index 30055bf..8bb9c44 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
@@ -19,10 +19,13 @@
 package org.apache.tinkerpop.gremlin.server.handler;
 
 import com.codahale.metrics.Meter;
+import io.netty.handler.timeout.IdleState;
+import io.netty.handler.timeout.IdleStateEvent;
 import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
 import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
 import org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor;
+import org.apache.tinkerpop.gremlin.server.Channelizer;
 import org.apache.tinkerpop.gremlin.server.Context;
 import org.apache.tinkerpop.gremlin.server.GraphManager;
 import org.apache.tinkerpop.gremlin.server.GremlinServer;
@@ -66,13 +69,24 @@ public class OpSelectorHandler extends MessageToMessageDecoder<RequestMessage> {
 
     private final GremlinExecutor gremlinExecutor;
     private final ScheduledExecutorService scheduledExecutorService;
+    private final Channelizer channelizer;
 
+    /**
+     * @deprecated As of release 3.2.8, replaced by {@link #OpSelectorHandler(Settings, GraphManager, GremlinExecutor, ScheduledExecutorService, Channelizer)}
+     */
+    @Deprecated
     public OpSelectorHandler(final Settings settings, final GraphManager graphManager, final GremlinExecutor gremlinExecutor,
                              final ScheduledExecutorService scheduledExecutorService) {
+        this(settings, graphManager, gremlinExecutor, scheduledExecutorService, null);
+    }
+
+    public OpSelectorHandler(final Settings settings, final GraphManager graphManager, final GremlinExecutor gremlinExecutor,
+                             final ScheduledExecutorService scheduledExecutorService, final Channelizer channelizer) {
         this.settings = settings;
         this.graphManager = graphManager;
         this.gremlinExecutor = gremlinExecutor;
         this.scheduledExecutorService = scheduledExecutorService;
+        this.channelizer = channelizer;
     }
 
     @Override
@@ -99,4 +113,25 @@ public class OpSelectorHandler extends MessageToMessageDecoder<RequestMessage> {
             ctx.writeAndFlush(ope.getResponseMessage());
         }
     }
+
+    @Override
+    public void userEventTriggered(final ChannelHandlerContext ctx, final Object evt) throws Exception {
+        // only need to handle this event if the idle monitor is on
+        if (!channelizer.supportsIdleMonitor()) return;
+
+        if (evt instanceof IdleStateEvent) {
+            final IdleStateEvent e = (IdleStateEvent) evt;
+
+            // if no requests (reader) then close, if no writes from server to client then ping. clients should
+            // periodically ping the server, but coming from this direction allows the server to kill channels that
+            // have dead clients on the other end
+            if (e.state() == IdleState.READER_IDLE) {
+                logger.info("Closing channel - client is disconnected after idle period of " + settings.idleReadLimit + " " + ctx.channel());
+                ctx.close();
+            } else if (e.state() == IdleState.WRITER_IDLE) {
+                logger.info("Checking channel - sending ping to client after idle period of " + settings.idleWriteLimit + " " + ctx.channel());
+                ctx.writeAndFlush(channelizer.createIdleDetectionMessage());
+            }
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsAndHttpChannelizerHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsAndHttpChannelizerHandler.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsAndHttpChannelizerHandler.java
index 328a34b..6d32194 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsAndHttpChannelizerHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsAndHttpChannelizerHandler.java
@@ -26,8 +26,10 @@ import io.netty.channel.EventLoopGroup;
 import io.netty.handler.codec.http.HttpMessage;
 import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
 import io.netty.handler.codec.http.HttpServerCodec;
+import org.apache.tinkerpop.gremlin.server.Channelizer;
 import org.apache.tinkerpop.gremlin.server.channel.HttpChannelizer;
 import org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer;
+import org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer;
 import org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler;
 import org.apache.tinkerpop.gremlin.server.handler.WsAndHttpChannelizerHandler;
 import org.apache.tinkerpop.gremlin.server.handler.WebSocketHandlerUtil;
@@ -39,9 +41,10 @@ import static org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer.P
 import static org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer.PIPELINE_REQUEST_HANDLER;
 import static org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer.PIPELINE_HTTP_RESPONSE_ENCODER;
 
-/*
+/**
  * A ChannelInboundHandlerAdapter for use with {@link WsAndHttpChannelizer} that toggles between WebSockets
- * and http
+ * and http.
+ *
  * @author Keith Lohnes lohnesk@gmail.com
  */
 @ChannelHandler.Sharable
@@ -56,6 +59,10 @@ public class WsAndHttpChannelizerHandler extends ChannelInboundHandlerAdapter {
         this.httpGremlinEndpointHandler = httpGremlinEndpointHandler;
     }
 
+    public Channelizer getWsChannelizer() {
+        return wsChannelizer;
+    }
+
     public void configure(final ChannelPipeline pipeline) {
         wsChannelizer.configure(pipeline);
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index c401de6..55912e1 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -27,6 +27,7 @@ import io.netty.handler.ssl.util.SelfSignedCertificate;
 import org.apache.commons.configuration.BaseConfiguration;
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.lang.exception.ExceptionUtils;
+import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.tinkerpop.gremlin.TestHelper;
 import org.apache.tinkerpop.gremlin.driver.Client;
@@ -54,6 +55,7 @@ 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.util.BulkSet;
+import org.apache.tinkerpop.gremlin.server.handler.OpSelectorHandler;
 import org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor;
 import org.apache.tinkerpop.gremlin.server.op.standard.StandardOpProcessor;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -82,7 +84,6 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Supplier;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
@@ -112,6 +113,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     private static final String KEY_PASS = "changeit";
     private static final String CLIENT_KEY = "src/test/resources/client.key.pk8";
     private static final String CLIENT_CRT = "src/test/resources/client.crt";
+    private Level previousLogLevel;
 
     private Log4jRecordingAppender recordingAppender = null;
     private final Supplier<Graph> graphGetter = () -> server.getServerGremlinExecutor().getGraphManager().getGraph("graph");
@@ -128,12 +130,26 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     public void setupForEachTest() {
         recordingAppender = new Log4jRecordingAppender();
         final Logger rootLogger = Logger.getRootLogger();
+
+        if (name.getMethodName().equals("shouldPingChannelIfClientDies")) {
+            final org.apache.log4j.Logger webSocketClientHandlerLogger = org.apache.log4j.Logger.getLogger(OpSelectorHandler.class);
+            previousLogLevel = webSocketClientHandlerLogger.getLevel();
+            webSocketClientHandlerLogger.setLevel(Level.INFO);
+        }
+
         rootLogger.addAppender(recordingAppender);
     }
 
     @After
     public void teardownForEachTest() {
         final Logger rootLogger = Logger.getRootLogger();
+
+        if (name.getMethodName().equals("shouldPingChannelIfClientDies")) {
+            final org.apache.log4j.Logger webSocketClientHandlerLogger = org.apache.log4j.Logger.getLogger(OpSelectorHandler.class);
+            previousLogLevel = webSocketClientHandlerLogger.getLevel();
+            webSocketClientHandlerLogger.setLevel(previousLogLevel);
+        }
+
         rootLogger.removeAppender(recordingAppender);
     }
 
@@ -234,6 +250,9 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             case "shouldTimeOutRemoteTraversal":
                 settings.scriptEvaluationTimeout = 500;
                 break;
+            case "shouldPingChannelIfClientDies":
+                settings.idleWriteLimit = 1000;
+                break;
         }
 
         return settings;
@@ -294,6 +313,21 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     }
 
     @Test
+    public void shouldPingChannelIfClientDies() throws Exception {
+        final Client client = TestClientFactory.build().maxConnectionPoolSize(1).minConnectionPoolSize(1).keepAliveInterval(0).create().connect();
+        client.submit("1+1").all().get();
+
+        // since we do nothing for 3 seconds and the time limit for ping is 1 second we should get *about* 3 pings -
+        // i don't think the assertion needs to be too accurate. just need to make sure there's a ping message out
+        // there record
+        Thread.sleep(3000);
+
+        assertThat(recordingAppender.logContainsAny(".*Checking channel - sending ping to client after idle period of .*$"), is(true));
+
+        client.close();
+    }
+
+    @Test
     public void shouldTimeOutRemoteTraversal() throws Exception {
         final Graph graph = EmptyGraph.instance();
         final GraphTraversalSource g = graph.traversal().withRemote(conf);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
index e44f72f..82c14ac 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
@@ -60,7 +60,8 @@ public class Log4jRecordingAppender extends AppenderSkeleton {
         messages.clear();
     }
 
-    public boolean logContainsAny(final String fragment) {
-        return messages.stream().anyMatch(m -> m.contains(fragment));
+    public boolean logContainsAny(final String regex) {
+        // chop off the line feed so that the regex doesn't have to account for that
+        return messages.stream().anyMatch(m -> m.substring(0,m.length() - 1).matches(regex));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppenderTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppenderTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppenderTest.java
index dd1ea63..624dfc4 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppenderTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppenderTest.java
@@ -69,7 +69,7 @@ public class Log4jRecordingAppenderTest {
 
     @Test
     public void shouldMatchAnyMessages() {
-        assertTrue(recordingAppender.logContainsAny("ERROR"));
+        assertTrue(recordingAppender.logContainsAny("ERROR.*"));
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
index 28ea1ac..e08973f 100644
--- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
+++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
@@ -44,6 +44,8 @@ processors:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
index f80c38a..b03e057 100644
--- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
+++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
@@ -39,6 +39,8 @@ processors:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10ab3341/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
index d30635d..a88b5a7 100644
--- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
+++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
@@ -36,6 +36,8 @@ processors:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
+idleReadLimit: 0
+idleWriteLimit: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192


[06/50] tinkerpop git commit: TINKERPOP-1857 Added GLV match() tests

Posted by dk...@apache.org.
TINKERPOP-1857 Added GLV match() tests


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

Branch: refs/heads/TINKERPOP-1777
Commit: ade1daf8670de64c3f57d9c7f13c2645e58754ac
Parents: 7a44584
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 1 13:06:44 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Match.feature         | 315 +++++++++++++++++++
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../gremlin/process/FeatureCoverageTest.java    |  17 +-
 3 files changed, 330 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ade1daf8/gremlin-test/features/map/Match.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature
index e3f04d5..006692a 100644
--- a/gremlin-test/features/map/Match.feature
+++ b/gremlin-test/features/map/Match.feature
@@ -78,3 +78,318 @@ Feature: Step - match()
       | m[{"a":"v[marko]","b":"v[josh]", "c":"v[ripple]"}] |
       | m[{"a":"v[marko]","b":"v[josh]", "c":"v[lop]"}] |
 
+  Scenario: g_V_matchXa_created_b__b_0created_cX_whereXa_neq_cX_selectXa_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").as("b"),
+                  __.as("b").in("created").as("c")).where("a", P.neq("c")).select("a", "c")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","c":"v[josh]"}] |
+      | m[{"a":"v[marko]","c":"v[peter]"}] |
+      | m[{"a":"v[josh]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","c":"v[peter]"}] |
+      | m[{"a":"v[peter]","c":"v[marko]"}] |
+      | m[{"a":"v[peter]","c":"v[josh]"}] |
+
+  Scenario: g_V_matchXd_0knows_a__d_hasXname_vadasX__a_knows_b__b_created_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("d").in("knows").as("a"),
+                  __.as("d").has("name", "vadas"),
+                  __.as("a").out("knows").as("b"),
+                  __.as("b").out("created").as("c"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[ripple]","d":"v[vadas]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]","d":"v[vadas]"}] |
+
+  Scenario: g_V_matchXa_created_lop_b__b_0created_29_c__c_whereXrepeatXoutX_timesX2XXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").has("name", "lop").as("b"),
+                  __.as("b").in("created").has("age", 29).as("c"),
+                  __.as("c").where(__.repeat(__.out()).times(2)))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+
+  Scenario: g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").match(__.as("a").out().count().as("c"), __.as("b").in().count().as("c"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":3}] |
+
+  Scenario: g_V_matchXa__a_out_b__notXa_created_bXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out().as("b"),__.not(__.as("a").out("created").as("b")))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[vadas]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]"}] |
+
+  Scenario: g_V_matchXa_created_lop_b__b_0created_29_cX_whereXc_repeatXoutX_timesX2XX_selectXa_b_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").has("name", "lop").as("b"),
+                  __.as("b").in("created").has("age", 29).as("c")).where(__.as("c").repeat(__.out()).times(2)).select("a", "b", "c")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+
+  Scenario: g_V_out_out_matchXa_0created_b__b_0knows_cX_selectXcX_outXcreatedX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().out().out().match(__.as("a").in("created").as("b"),
+                              __.as("b").in("knows").as("c")).
+                        select("c").out("created").values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | lop    |
+      | lop    |
+
+  Scenario: g_V_matchXa_knows_b__b_created_c__a_created_cX_dedupXa_b_cX_selectXaX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.as("b").out("created").as("c"),
+                  __.as("a").out("created").as("c")).dedup("a", "b", "c").select("a").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+
+  Scenario: g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").as("b"),
+                  __.as("a").repeat(__.out()).times(2).as("b")).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]"}] |
+
+  Scenario: g_V_notXmatchXa_age_b__a_name_cX_whereXb_eqXcXX_selectXaXX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().not(__.match(__.as("a").values("age").as("b"), __.as("a").values("name").as("c")).where("b", P.eq("c")).select("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | vadas |
+      | lop   |
+      | josh  |
+      | ripple |
+      | peter  |
+
+  Scenario: g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.and(__.as("a").out("created").as("c"),
+                         __.as("b").out("created").as("c"),
+                         __.and(__.as("b").out("created").count().as("d"),
+                                __.as("a").out("knows").count().as("d"))))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]","d":2}] |
+
+  Scenario: g_V_matchXa_whereXa_neqXcXX__a_created_b__orXa_knows_vadas__a_0knows_and_a_hasXlabel_personXX__b_0created_c__b_0created_count_isXgtX1XXX_selectXa_b_cX_byXidX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.where("a", P.neq("c")),
+                  __.as("a").out("created").as("b"),
+                  __.or(__.as("a").out("knows").has("name", "vadas"),
+                        __.as("a").in("knows").and().as("a").has(T.label, "person")),
+                  __.as("b").in("created").as("c"),
+                  __.as("b").in("created").count().is(P.gt(1))).select("a", "b", "c").by(T.id)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":1,"b":3,"c":4}] |
+      | m[{"a":1,"b":3,"c":6}] |
+      | m[{"a":4,"b":3,"c":1}] |
+      | m[{"a":4,"b":3,"c":6}] |
+
+  Scenario: g_V_matchXa__a_both_b__b_both_cX_dedupXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").both().as("b"),
+                  __.as("b").both().as("c")).dedup("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[ripple]"}] |
+      | m[{"a":"v[vadas]","b":"v[marko]","c":"v[lop]"}] |
+      | m[{"a":"v[lop]","b":"v[marko]","c":"v[lop]"}] |
+      | m[{"a":"v[lop]","b":"v[josh]","c":"v[ripple]"}] |
+      | m[{"a":"v[lop]","b":"v[peter]","c":"v[lop]"}] |
+      | m[{"a":"v[josh]","b":"v[ripple]","c":"v[josh]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","b":"v[marko]","c":"v[lop]"}] |
+      | m[{"a":"v[ripple]","b":"v[josh]","c":"v[ripple]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+
+  Scenario: g_V_matchXa_knows_b__b_created_lop__b_matchXb_created_d__d_0created_cX_selectXcX_cX_selectXa_b_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.as("b").out("created").has("name", "lop"),
+                  __.as("b").match(__.as("b").out("created").as("d"),
+                                   __.as("d").in("created").as("c")).select("c").as("c")).select("a", "b", "c")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[josh]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[josh]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[peter]"}] |
+
+  Scenario: g_V_matchXa_knows_b__a_created_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.as("a").out("created").as("c"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"v[lop]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]"}] |
+
+  Scenario: g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.where(__.and(__.as("a").out("created").as("b"),
+                                  __.as("b").in("created").count().is(P.eq(3)))),
+                  __.as("a").both().as("b"),
+                  __.where(__.as("b").in()))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]"}] |
+
+  Scenario: g_V_matchXa_outEXcreatedX_order_byXweight_decrX_limitX1X_inV_b__b_hasXlang_javaXX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").outE("created").order().by("weight", Order.decr).limit(1).inV().as("b"),
+                  __.as("b").has("lang", "java")).select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"marko","b":"lop"}] |
+      | m[{"a":"josh","b":"ripple"}] |
+      | m[{"a":"peter","b":"lop"}] |
+
+  Scenario: g_V_matchXa_both_b__b_both_cX_dedupXa_bX_byXlabelX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").both().as("b"),
+                  __.as("b").both().as("c")).dedup("a", "b").by(T.label)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"v[marko]"}] |
+      | m[{"a":"v[lop]","b":"v[marko]","c":"v[lop]"}] |
+
+  Scenario: g_V_matchXa_created_b__b_0created_aX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").as("b"),
+                  __.as("b").in("created").as("a"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]"}] |
+      | m[{"a":"v[josh]","b":"v[ripple]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]"}] |
+
+  Scenario: g_V_asXaX_out_asXbX_matchXa_out_count_c__orXa_knows_b__b_in_count_c__and__c_isXgtX2XXXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").match(__.as("a").out().count().as("c"),
+                                        __.or(__.as("a").out("knows").as("b"),__.as("b").in().count().as("c").and().as("c").is(P.gt(2))))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"d[3].l"}] |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"d[3].l"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"d[3].l"}] |
+
+  Scenario: g_V_matchXa_knows_count_bX_selectXbX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").count().as("b")).select("b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[2].l |
+      | d[0].l |
+      | d[0].l |
+      | d[0].l |
+      | d[0].l |
+      | d[0].l |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ade1daf8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
index cab3cbf..40ae6e9 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
@@ -255,7 +255,7 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXab_nameX() throws Exception {
+    public void g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX() throws Exception {
         final Traversal<Vertex, Map<String, Vertex>> traversal = get_g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX();
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
@@ -490,7 +490,7 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_bX() {
+    public void g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX() {
         final Traversal<Vertex, Map<String, Object>> traversal = get_g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX();
         printTraversalForm(traversal);
         checkResults(makeMapList(2,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ade1daf8/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index ff6156a..48c64b9 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -100,11 +100,20 @@ public class FeatureCoverageTest {
 
     private static Pattern scenarioName = Pattern.compile("^\\s*Scenario:\\s*(.*)$");
 
-    // g_V_addVXlabel_animal_age_0X - deprecated
-    // g_addVXlabel_person_name_stephenX - deprecated
     private static final List<String> testToIgnore = Arrays.asList(
+            // deprecated tests
             "g_V_addVXlabel_animal_age_0X",
-            "g_addVXlabel_person_name_stephenX");
+            "g_addVXlabel_person_name_stephenX",
+            // grateful dead graph not supported in GLV suite
+            "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_d__c_sungBy_d__d_hasXname_GarciaXX",
+            "g_V_matchXa_hasXsong_name_sunshineX__a_mapX0followedBy_weight_meanX_b__a_0followedBy_c__c_filterXweight_whereXgteXbXXX_outV_dX_selectXdX_byXnameX",
+            "g_V_matchXa_0sungBy_b__a_0sungBy_c__b_writtenBy_d__c_writtenBy_e__d_hasXname_George_HarisonX__e_hasXname_Bob_MarleyXX",
+            "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__a_0sungBy_bX",
+            "g_V_hasLabelXsongsX_matchXa_name_b__a_performances_cX_selectXb_cX_count",
+            "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__b_followedBy_c__c_writtenBy_d__whereXd_neqXaXXX",
+            "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_dX_whereXc_sungBy_dX_whereXd_hasXname_GarciaXX",
+            "get_g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
+            "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
@@ -208,7 +217,7 @@ public class FeatureCoverageTest {
 
             testMethods.removeAll(testsInFeatureFile);
 
-            assertEquals("All test methods are not implemented in the " + featureFileName + ": " + testMethods, testMethods.size(), 0);
+            assertEquals("All test methods are not implemented in the " + featureFileName + ": " + testMethods, 0, testMethods.size());
         }
     }
 }


[24/50] tinkerpop git commit: TINKERPOP-1726 Added test to check if server auto-closes channels properly

Posted by dk...@apache.org.
TINKERPOP-1726 Added test to check if server auto-closes channels properly


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

Branch: refs/heads/TINKERPOP-1777
Commit: da48b74b1e10065978f4905693c3b97dad257a0a
Parents: 00e4235
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 09:54:01 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 09:54:01 2018 -0500

----------------------------------------------------------------------
 .../server/GremlinServerIntegrateTest.java      | 23 ++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/da48b74b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 033c847..1db7a50 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -131,7 +131,8 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
         recordingAppender = new Log4jRecordingAppender();
         final Logger rootLogger = Logger.getRootLogger();
 
-        if (name.getMethodName().equals("shouldPingChannelIfClientDies")) {
+        if (name.getMethodName().equals("shouldPingChannelIfClientDies") ||
+                name.getMethodName().equals("shouldCloseChannelIfClientDoesntRespond")) {
             final org.apache.log4j.Logger webSocketClientHandlerLogger = org.apache.log4j.Logger.getLogger(OpSelectorHandler.class);
             previousLogLevel = webSocketClientHandlerLogger.getLevel();
             webSocketClientHandlerLogger.setLevel(Level.INFO);
@@ -144,7 +145,8 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     public void teardownForEachTest() {
         final Logger rootLogger = Logger.getRootLogger();
 
-        if (name.getMethodName().equals("shouldPingChannelIfClientDies")) {
+        if (name.getMethodName().equals("shouldPingChannelIfClientDies")||
+                name.getMethodName().equals("shouldCloseChannelIfClientDoesntRespond")) {
             final org.apache.log4j.Logger webSocketClientHandlerLogger = org.apache.log4j.Logger.getLogger(OpSelectorHandler.class);
             previousLogLevel = webSocketClientHandlerLogger.getLevel();
             webSocketClientHandlerLogger.setLevel(previousLogLevel);
@@ -253,6 +255,9 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             case "shouldPingChannelIfClientDies":
                 settings.keepAliveInterval = 1000;
                 break;
+            case "shouldCloseChannelIfClientDoesntRespond":
+                settings.idleConnectionTimeout = 1000;
+                break;
         }
 
         return settings;
@@ -313,6 +318,20 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     }
 
     @Test
+    public void shouldCloseChannelIfClientDoesntRespond() throws Exception {
+        final SimpleClient client = TestClientFactory.createWebSocketClient();
+        client.submit("1+1");
+
+        // since we do nothing for 2 seconds and the time limit for timeout on the server is 1 second, the server
+        // will autoclose the channel
+        Thread.sleep(2000);
+
+        assertThat(recordingAppender.logContainsAny(".*Closing channel - client is disconnected after idle period of .*$"), is(true));
+
+        client.close();
+    }
+
+    @Test
     public void shouldPingChannelIfClientDies() throws Exception {
         final Client client = TestClientFactory.build().maxConnectionPoolSize(1).minConnectionPoolSize(1).keepAliveInterval(0).create().connect();
         client.submit("1+1").all().get();


[50/50] tinkerpop git commit: Fixed the behavior of `min()`, `max()`, `mean()` and `sum()`. If no input is given, these steps will now throw a `FastNoElementException`.

Posted by dk...@apache.org.
Fixed the behavior of `min()`, `max()`, `mean()` and `sum()`.
If no input is given, these steps will now throw a `FastNoElementException`.


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

Branch: refs/heads/TINKERPOP-1777
Commit: be3a5db18c4b8cacecbda9f8a607ce338f9b0f1d
Parents: 05c1c04
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Feb 27 10:15:07 2018 -0700
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Feb 27 10:17:04 2018 -0700

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  2 +
 .../traversal/step/map/ComputerResultStep.java  |  4 +-
 .../process/traversal/step/filter/AndStep.java  |  2 +-
 .../traversal/step/map/MaxGlobalStep.java       |  8 ++-
 .../traversal/step/map/MaxLocalStep.java        |  9 ++-
 .../traversal/step/map/MeanGlobalStep.java      |  6 ++
 .../traversal/step/map/MeanLocalStep.java       |  4 +-
 .../traversal/step/map/MinGlobalStep.java       |  6 ++
 .../traversal/step/map/MinLocalStep.java        |  9 ++-
 .../traversal/step/map/SumGlobalStep.java       |  8 ++-
 .../traversal/step/map/SumLocalStep.java        |  9 ++-
 .../process/traversal/step/map/MaxTest.java     | 48 +++++++++++++++-
 .../process/traversal/step/map/MeanTest.java    | 43 ++++++++++++--
 .../process/traversal/step/map/MinTest.java     | 46 +++++++++++++++
 .../process/traversal/step/map/SumTest.java     | 60 ++++++++++++++++++--
 .../SparkStarBarrierInterceptor.java            | 32 ++++++-----
 .../structure/TinkerGraphPlayTest.java          |  7 +--
 17 files changed, 251 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d07fb13..93ed690 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,8 @@ NEED AND IMAGE
 
 This release also includes changes from <<release-3-3-2, 3.3.2>>.
 
+* Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available.
+
 
 == TinkerPop 3.3.0 (Gremlin Symphony #40 in G Minor)
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ComputerResultStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ComputerResultStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ComputerResultStep.java
index b5fd8e8..95e572d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ComputerResultStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/ComputerResultStep.java
@@ -66,7 +66,9 @@ public final class ComputerResultStep<S> extends AbstractStep<ComputerResult, S>
                 return this.currentIterator.next();
             else {
                 final ComputerResult result = this.starts.next().get();
-                this.currentIterator = attach(result.memory().<TraverserSet<S>>get(TraversalVertexProgram.HALTED_TRAVERSERS).iterator(), result.graph());
+                this.currentIterator = attach(result.memory().exists(TraversalVertexProgram.HALTED_TRAVERSERS)
+                        ? result.memory().<TraverserSet<S>>get(TraversalVertexProgram.HALTED_TRAVERSERS).iterator()
+                        : EmptyIterator.instance(), result.graph());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
index 5d9d124..5c20cd8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
@@ -39,4 +39,4 @@ public final class AndStep<S> extends ConnectiveStep<S> {
         }
         return true;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxGlobalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxGlobalStep.java
index 954dbfe..8cb798c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxGlobalStep.java
@@ -41,7 +41,13 @@ public final class MaxGlobalStep<S extends Number> extends ReducingBarrierStep<S
     }
 
     @Override
-    public S projectTraverser(Traverser.Admin<S> traverser) {
+    public void processAllStarts() {
+        if (this.starts.hasNext())
+            super.processAllStarts();
+    }
+
+    @Override
+    public S projectTraverser(final Traverser.Admin<S> traverser) {
         return traverser.get();
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxLocalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxLocalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxLocalStep.java
index 2baca28..909a4c7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxLocalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxLocalStep.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
+import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementException;
 
 import java.util.Collections;
 import java.util.Iterator;
@@ -40,17 +41,15 @@ public final class MaxLocalStep<E extends Number, S extends Iterable<E>> extends
 
     @Override
     protected E map(final Traverser.Admin<S> traverser) {
-        Number result;
         final Iterator<E> iterator = traverser.get().iterator();
         if (iterator.hasNext()) {
-            result = iterator.next();
+            Number result = iterator.next();
             while (iterator.hasNext()) {
                 result = max(iterator.next(), result);
             }
-        } else {
-            result = Double.NaN;
+            return (E) result;
         }
-        return (E) result;
+        throw FastNoSuchElementException.instance();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanGlobalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanGlobalStep.java
index 2f1c1dc..5e90336 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanGlobalStep.java
@@ -49,6 +49,12 @@ public final class MeanGlobalStep<S extends Number, E extends Number> extends Re
     }
 
     @Override
+    public void processAllStarts() {
+        if (this.starts.hasNext())
+            super.processAllStarts();
+    }
+
+    @Override
     public E projectTraverser(final Traverser.Admin<S> traverser) {
         return (E) new MeanNumber(traverser.get(), traverser.bulk());
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanLocalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanLocalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanLocalStep.java
index 99005c9..91447fd 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanLocalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanLocalStep.java
@@ -22,6 +22,7 @@ import org.apache.tinkerpop.gremlin.util.NumberHelper;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
+import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementException;
 
 import java.util.Collections;
 import java.util.Iterator;
@@ -48,9 +49,8 @@ public final class MeanLocalStep<E extends Number, S extends Iterable<E>> extend
                 counter++;
             }
             return NumberHelper.div(result, counter, true);
-        } else {
-            return Double.NaN;
         }
+        throw FastNoSuchElementException.instance();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinGlobalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinGlobalStep.java
index 7d0eb56..e476f5c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinGlobalStep.java
@@ -41,6 +41,12 @@ public final class MinGlobalStep<S extends Number> extends ReducingBarrierStep<S
     }
 
     @Override
+    public void processAllStarts() {
+        if (this.starts.hasNext())
+            super.processAllStarts();
+    }
+
+    @Override
     public S projectTraverser(final Traverser.Admin<S> traverser) {
         return traverser.get();
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinLocalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinLocalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinLocalStep.java
index e7e001c..64c89e3 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinLocalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinLocalStep.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
+import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementException;
 
 import java.util.Collections;
 import java.util.Iterator;
@@ -40,17 +41,15 @@ public final class MinLocalStep<E extends Number, S extends Iterable<E>> extends
 
     @Override
     protected E map(final Traverser.Admin<S> traverser) {
-        Number result;
         final Iterator<E> iterator = traverser.get().iterator();
         if (iterator.hasNext()) {
-            result = iterator.next();
+            Number result = iterator.next();
             while (iterator.hasNext()) {
                 result = min(iterator.next(), result);
             }
-        } else {
-            result = Double.NaN;
+            return (E) result;
         }
-        return (E) result;
+        throw FastNoSuchElementException.instance();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumGlobalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumGlobalStep.java
index 7942d9b..3711cfe 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumGlobalStep.java
@@ -48,6 +48,12 @@ public final class SumGlobalStep<S extends Number> extends ReducingBarrierStep<S
     }
 
     @Override
+    public void processAllStarts() {
+        if (this.starts.hasNext())
+            super.processAllStarts();
+    }
+
+    @Override
     public S projectTraverser(final Traverser.Admin<S> traverser) {
         return (S) mul(traverser.get(), traverser.bulk());
     }
@@ -57,4 +63,4 @@ public final class SumGlobalStep<S extends Number> extends ReducingBarrierStep<S
     public Set<TraverserRequirement> getRequirements() {
         return REQUIREMENTS;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumLocalStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumLocalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumLocalStep.java
index b062a7e..72e6539 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumLocalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumLocalStep.java
@@ -22,6 +22,7 @@ import org.apache.tinkerpop.gremlin.util.NumberHelper;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
+import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementException;
 
 import java.util.Collections;
 import java.util.Iterator;
@@ -39,17 +40,15 @@ public final class SumLocalStep<E extends Number, S extends Iterable<E>> extends
 
     @Override
     protected E map(final Traverser.Admin<S> traverser) {
-        Number result;
         final Iterator<E> iterator = traverser.get().iterator();
         if (iterator.hasNext()) {
-            result = iterator.next();
+            Number result = iterator.next();
             while (iterator.hasNext()) {
                 result = NumberHelper.add(result, iterator.next());
             }
-        } else {
-            result = 0;
+            return (E) result;
         }
-        return (E) result;
+        throw FastNoSuchElementException.instance();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxTest.java
index fae3f92..f13cdb5 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MaxTest.java
@@ -21,6 +21,7 @@ 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.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
@@ -41,6 +42,12 @@ public abstract class MaxTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Integer> get_g_V_age_max();
 
+    public abstract Traversal<Vertex, Integer> get_g_V_age_fold_maxXlocalX();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_max();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_fold_maxXlocalX();
+
     public abstract Traversal<Vertex, Integer> get_g_V_repeatXbothX_timesX5X_age_max();
 
     public abstract Traversal<Vertex, Map<String, Number>> get_g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_maxX();
@@ -55,6 +62,30 @@ public abstract class MaxTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
+    public void g_V_age_fold_maxXlocalX() {
+        final Traversal<Vertex, Integer> traversal = get_g_V_age_fold_maxXlocalX();
+        printTraversalForm(traversal);
+        checkResults(Arrays.asList(35), traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_foo_max() {
+        final Traversal<Vertex, Number> traversal = get_g_V_foo_max();
+        printTraversalForm(traversal);
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_foo_fold_maxXlocalX() {
+        final Traversal<Vertex, Number> traversal = get_g_V_foo_fold_maxXlocalX();
+        printTraversalForm(traversal);
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
     public void g_V_repeatXbothX_timesX5X_age_max() {
         final Traversal<Vertex, Integer> traversal = get_g_V_repeatXbothX_timesX5X_age_max();
         printTraversalForm(traversal);
@@ -82,6 +113,21 @@ public abstract class MaxTest extends AbstractGremlinProcessTest {
         }
 
         @Override
+        public Traversal<Vertex, Integer> get_g_V_age_fold_maxXlocalX() {
+            return g.V().values("age").fold().max(Scope.local);
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_max() {
+            return g.V().values("foo").max();
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_fold_maxXlocalX() {
+            return g.V().values("foo").fold().max(Scope.local);
+        }
+
+        @Override
         public Traversal<Vertex, Integer> get_g_V_repeatXbothX_timesX5X_age_max() {
             return g.V().repeat(both()).times(5).values("age").max();
         }
@@ -91,4 +137,4 @@ public abstract class MaxTest extends AbstractGremlinProcessTest {
             return g.V().hasLabel("software").<String, Number>group().by("name").by(bothE().values("weight").max());
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanTest.java
index ab47605..34bef6d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanTest.java
@@ -21,11 +21,13 @@ 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.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import java.util.Arrays;
 import java.util.Map;
 
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
@@ -40,16 +42,32 @@ public abstract class MeanTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Double> get_g_V_age_mean();
 
+    public abstract Traversal<Vertex, Double> get_g_V_age_fold_meanXlocalX();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_mean();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_fold_meanXlocalX();
+
     public abstract Traversal<Vertex, Map<String, Number>> get_g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_meanX();
 
     @Test
     @LoadGraphWith(MODERN)
     public void g_V_age_mean() {
-        final Traversal<Vertex, Double> traversal = get_g_V_age_mean();
-        printTraversalForm(traversal);
-        final Double mean = traversal.next();
-        assertEquals(30.75, mean, 0.05);
-        assertFalse(traversal.hasNext());
+        for (final Traversal<Vertex, Double> traversal : Arrays.asList(get_g_V_age_mean(), get_g_V_age_fold_meanXlocalX())) {
+            printTraversalForm(traversal);
+            final Double mean = traversal.next();
+            assertEquals(30.75, mean, 0.05);
+            assertFalse(traversal.hasNext());
+        }
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_foo_mean() {
+        for (final Traversal<Vertex, Number> traversal : Arrays.asList(get_g_V_foo_mean(), get_g_V_foo_fold_meanXlocalX())) {
+            printTraversalForm(traversal);
+            assertFalse(traversal.hasNext());
+        }
     }
 
     @Test
@@ -73,6 +91,21 @@ public abstract class MeanTest extends AbstractGremlinProcessTest {
         }
 
         @Override
+        public Traversal<Vertex, Double> get_g_V_age_fold_meanXlocalX() {
+            return g.V().values("age").fold().mean(Scope.local);
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_mean() {
+            return g.V().values("foo").mean();
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_fold_meanXlocalX() {
+            return g.V().values("foo").fold().mean(Scope.local);
+        }
+
+        @Override
         public Traversal<Vertex, Map<String, Number>> get_g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_meanX() {
             return g.V().hasLabel("software").<String, Number>group().by("name").by(bothE().values("weight").mean());
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinTest.java
index 947137f..10f6bc8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MinTest.java
@@ -21,6 +21,7 @@ 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.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
@@ -43,6 +44,12 @@ public abstract class MinTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Integer> get_g_V_age_min();
 
+    public abstract Traversal<Vertex, Integer> get_g_V_age_fold_minXlocalX();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_min();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_fold_minXlocalX();
+
     public abstract Traversal<Vertex, Integer> get_g_V_repeatXbothX_timesX5X_age_min();
 
     public abstract Traversal<Vertex, Map<String, Number>> get_g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_minX();
@@ -59,6 +66,30 @@ public abstract class MinTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
+    public void g_V_age_fold_minXlocalX() {
+        final Traversal<Vertex, Integer> traversal = get_g_V_age_fold_minXlocalX();
+        printTraversalForm(traversal);
+        checkResults(Arrays.asList(27), traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_foo_min() {
+        final Traversal<Vertex, Number> traversal = get_g_V_foo_min();
+        printTraversalForm(traversal);
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_foo_fold_minXlocalX() {
+        final Traversal<Vertex, Number> traversal = get_g_V_foo_fold_minXlocalX();
+        printTraversalForm(traversal);
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
     public void g_V_repeatXbothX_timesX5X_age_min() {
         final Traversal<Vertex, Integer> traversal = get_g_V_repeatXbothX_timesX5X_age_min();
         printTraversalForm(traversal);
@@ -96,6 +127,21 @@ public abstract class MinTest extends AbstractGremlinProcessTest {
         }
 
         @Override
+        public Traversal<Vertex, Integer> get_g_V_age_fold_minXlocalX() {
+            return g.V().values("age").fold().min(Scope.local);
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_min() {
+            return g.V().values("foo").min();
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_fold_minXlocalX() {
+            return g.V().values("foo").fold().min(Scope.local);
+        }
+
+        @Override
         public Traversal<Vertex, Integer> get_g_V_repeatXbothX_timesX5X_age_min() {
             return g.V().repeat(both()).times(5).values("age").min();
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
index 1183863..e1bbd0b 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
@@ -21,6 +21,7 @@ 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.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
@@ -39,17 +40,49 @@ import static org.junit.Assert.*;
 @RunWith(GremlinProcessRunner.class)
 public abstract class SumTest extends AbstractGremlinProcessTest {
 
-    public abstract Traversal<Vertex, Double> get_g_V_valuesXageX_sum();
+    public abstract Traversal<Vertex, Integer> get_g_V_valuesXageX_sum();
+
+    public abstract Traversal<Vertex, Integer> get_g_V_age_fold_sumXlocalX();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_sum();
+
+    public abstract Traversal<Vertex, Number> get_g_V_foo_fold_sumXlocalX();
 
     public abstract Traversal<Vertex, Map<String, Number>> get_g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_sumX();
 
     @Test
     @LoadGraphWith(MODERN)
     public void g_V_valuesXageX_sum() {
-        final Traversal<Vertex, Double> traversal = get_g_V_valuesXageX_sum();
+        final Traversal<Vertex, Integer> traversal = get_g_V_valuesXageX_sum();
+        printTraversalForm(traversal);
+        final Integer sum = traversal.next();
+        assertEquals(123, sum.intValue());
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_age_fold_sumXlocalX() {
+        final Traversal<Vertex, Integer> traversal = get_g_V_age_fold_sumXlocalX();
+        printTraversalForm(traversal);
+        final Integer sum = traversal.next();
+        assertEquals(123, sum.intValue());
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_foo_sum() {
+        final Traversal<Vertex, Number> traversal = get_g_V_foo_sum();
+        printTraversalForm(traversal);
+        assertFalse(traversal.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_foo_fold_sumXlocalX() {
+        final Traversal<Vertex, Number> traversal = get_g_V_foo_fold_sumXlocalX();
         printTraversalForm(traversal);
-        final Number sum = traversal.next();
-        assertEquals(123L, sum);
         assertFalse(traversal.hasNext());
     }
 
@@ -69,13 +102,28 @@ public abstract class SumTest extends AbstractGremlinProcessTest {
     public static class Traversals extends SumTest {
 
         @Override
-        public Traversal<Vertex, Double> get_g_V_valuesXageX_sum() {
+        public Traversal<Vertex, Integer> get_g_V_valuesXageX_sum() {
             return g.V().values("age").sum();
         }
 
         @Override
+        public Traversal<Vertex, Integer> get_g_V_age_fold_sumXlocalX() {
+            return g.V().values("age").fold().sum(Scope.local);
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_sum() {
+            return g.V().values("foo").sum();
+        }
+
+        @Override
+        public Traversal<Vertex, Number> get_g_V_foo_fold_sumXlocalX() {
+            return g.V().values("foo").fold().sum(Scope.local);
+        }
+
+        @Override
         public Traversal<Vertex, Map<String, Number>> get_g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_sumX() {
             return g.V().hasLabel("software").<String, Number>group().by("name").by(bothE().values("weight").sum());
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
index 3c74e5a..3c89c1d 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/interceptor/SparkStarBarrierInterceptor.java
@@ -45,6 +45,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.Subgra
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ComputerVerificationStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
+import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementException;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.spark.process.computer.SparkMemory;
 import org.apache.tinkerpop.gremlin.spark.process.computer.traversal.strategy.SparkVertexProgramInterceptor;
@@ -52,6 +53,7 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.util.ElementHelper;
 import org.apache.tinkerpop.gremlin.util.NumberHelper;
 import org.apache.tinkerpop.gremlin.util.function.ArrayListSupplier;
+import org.apache.tinkerpop.gremlin.util.function.MeanNumberSupplier;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 
 import java.util.ArrayList;
@@ -97,24 +99,24 @@ public final class SparkStarBarrierInterceptor implements SparkVertexProgramInte
         final Object result;
         if (endStep instanceof CountGlobalStep)
             result = nextRDD.map(Traverser::bulk).fold(0l, (a, b) -> a + b);
-        else if (endStep instanceof SumGlobalStep)
+        else if (endStep instanceof SumGlobalStep) {
             result = nextRDD
                     .map(traverser -> NumberHelper.mul(traverser.bulk(), (Number) traverser.get()))
                     .fold(0, NumberHelper::add);
-        else if (endStep instanceof MeanGlobalStep)
-            result = nextRDD
+        } else if (endStep instanceof MeanGlobalStep) {
+            result = nextRDD.isEmpty() ? null : nextRDD
                     .map(traverser -> new MeanGlobalStep.MeanNumber((Number) traverser.get(), traverser.bulk()))
-                    .fold(new MeanGlobalStep.MeanNumber(), MeanGlobalStep.MeanNumber::add)
+                    .fold(MeanNumberSupplier.instance().get(), MeanGlobalStep.MeanNumber::add)
                     .getFinal();
-        else if (endStep instanceof MinGlobalStep)
-            result = nextRDD
+        } else if (endStep instanceof MinGlobalStep) {
+            result = nextRDD.isEmpty() ? null : nextRDD
                     .map(traverser -> (Number) traverser.get())
-                    .fold(Integer.MAX_VALUE, NumberHelper::min);
-        else if (endStep instanceof MaxGlobalStep)
-            result = nextRDD
+                    .fold(Double.NaN, NumberHelper::min);
+        } else if (endStep instanceof MaxGlobalStep) {
+            result = nextRDD.isEmpty() ? null : nextRDD
                     .map(traverser -> (Number) traverser.get())
-                    .fold(Integer.MIN_VALUE, NumberHelper::max);
-        else if (endStep instanceof FoldStep) {
+                    .fold(Double.NaN, NumberHelper::max);
+        } else if (endStep instanceof FoldStep) {
             final BinaryOperator biOperator = endStep.getBiOperator();
             result = nextRDD.map(traverser -> {
                 if (endStep.getSeedSupplier() instanceof ArrayListSupplier) {
@@ -148,9 +150,11 @@ public final class SparkStarBarrierInterceptor implements SparkVertexProgramInte
         ///////////////////////////////
 
         // generate the HALTED_TRAVERSERS for the memory
-        final TraverserSet<Long> haltedTraversers = new TraverserSet<>();
-        haltedTraversers.add(traversal.getTraverserGenerator().generate(result, endStep, 1l)); // all reducing barrier steps produce a result of bulk 1
-        memory.set(TraversalVertexProgram.HALTED_TRAVERSERS, haltedTraversers);
+        if (result != null) {
+            final TraverserSet<Long> haltedTraversers = new TraverserSet<>();
+            haltedTraversers.add(traversal.getTraverserGenerator().generate(result, endStep, 1l)); // all reducing barrier steps produce a result of bulk 1
+            memory.set(TraversalVertexProgram.HALTED_TRAVERSERS, haltedTraversers);
+        }
         memory.incrIteration(); // any local star graph reduction takes a single iteration
         return inputRDD;
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be3a5db1/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
index a13a4ad..eacc3db 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
@@ -132,11 +132,8 @@ public class TinkerGraphPlayTest {
     public void testPlayDK() throws Exception {
 
         Graph graph = TinkerGraph.open();
-        GraphTraversalSource g = graph.traversal();
-        graph.io(GraphMLIo.build()).readGraph("/projects/apache/tinkerpop/data/grateful-dead.xml");
-        System.out.println(g.V().filter(outE("sungBy").count().is(0)).explain());
-        System.out.println(g.V().filter(outE("sungBy").count().is(lt(1))).explain());
-        System.out.println(g.V().filter(outE("sungBy").count().is(1)).explain());
+        GraphTraversalSource g = graph.traversal().withComputer();
+        g.V().values("test").max().forEachRemaining(System.out::println);
     }
 
     @Test


[12/50] tinkerpop git commit: TINKERPOP-1857 Fixed a bad has() GLV test

Posted by dk...@apache.org.
TINKERPOP-1857 Fixed a bad has() GLV test

Made test naming more consistent.


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

Branch: refs/heads/TINKERPOP-1777
Commit: 97d4511c65ecb410b566a13b594aaa2786afe2ec
Parents: 5db5f21
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 7 08:19:26 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/filter/Has.feature                | 12 ++++++------
 .../gremlin/process/traversal/step/filter/HasTest.java  |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97d4511c/gremlin-test/features/filter/Has.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index 17f2716..ddf9984 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -127,12 +127,12 @@ Feature: Step - has()
     When iterated to list
     Then the result should be empty
 
-  Scenario: g_VX2X_hasXage_gt_30X
+  Scenario: g_VX4X_hasXage_gt_30X
     Given the modern graph
-    And using the parameter v2Id defined as "v[josh].id"
+    And using the parameter v4Id defined as "v[josh].id"
     And the traversal of
       """
-      g.V(v2Id).has("age", P.gt(30))
+      g.V(v4Id).has("age", P.gt(30))
       """
     When iterated to list
     Then the result should be unordered
@@ -149,13 +149,13 @@ Feature: Step - has()
     When iterated to list
     Then the result should be empty
 
-  Scenario: g_VXv2X_hasXage_gt_30X
+  Scenario: g_VXv4X_hasXage_gt_30X
     Given the modern graph
-    And using the parameter v4Id defined as "v[josh].id"
+    And using the parameter v4 defined as "v[josh]"
     And using the parameter d30 defined as "d[30].i"
     And the traversal of
       """
-      g.V(g.V(v4Id).next()).has("age", P.gt(d30))
+      g.V(v4).has("age", P.gt(d30))
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97d4511c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index deff30b..3bdb24a 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -218,7 +218,7 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VX2X_hasXage_gt_30X() {
+    public void g_VX4X_hasXage_gt_30X() {
         final Traversal<Vertex, Vertex> traversalJosh = get_g_VX1X_hasXage_gt_30X(convertToVertexId("josh"));
         printTraversalForm(traversalJosh);
         assertTrue(traversalJosh.hasNext());
@@ -227,15 +227,15 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_VXv1X_hasXage_gt_30X() {
-        final Traversal<Vertex, Vertex> traversalMarko = get_g_VXv1X_hasXage_gt_30X(convertToVertexId("marko"));
+        final Traversal<Vertex, Vertex> traversalMarko = get_g_VXv1X_hasXage_gt_30X(convertToVertex(graph,"marko"));
         printTraversalForm(traversalMarko);
         assertFalse(traversalMarko.hasNext());
     }
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VXv2X_hasXage_gt_30X() {
-        final Traversal<Vertex, Vertex> traversalJosh = get_g_VXv1X_hasXage_gt_30X(convertToVertexId("josh"));
+    public void g_VXv4X_hasXage_gt_30X() {
+        final Traversal<Vertex, Vertex> traversalJosh = get_g_VXv1X_hasXage_gt_30X(convertToVertex(graph,"josh"));
         printTraversalForm(traversalJosh);
         assertTrue(traversalJosh.hasNext());
     }


[31/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'

Conflicts:
	gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
	gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
	gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
	gremlin-server/src/test/scripts/test-server-start.groovy


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

Branch: refs/heads/TINKERPOP-1777
Commit: 1c49c274fdb24acbfed3697e85dbf09509d3e57b
Parents: 9043744 d42d54d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 14:06:43 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 14:06:43 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                |  22 +-
 .../Gherkin/IgnoreException.cs                  |  12 +-
 .../Gherkin/ScenarioData.cs                     |   2 +-
 .../lib/driver/driver-remote-connection.js      |  35 ++
 .../test/cucumber/feature-steps.js              |   7 +
 .../gremlin-javascript/test/cucumber/world.js   |   2 +-
 gremlin-python/glv/TraversalSource.template     |  14 +-
 .../jython/gremlin_python/process/traversal.py  |  14 +-
 .../src/main/jython/radish/feature_steps.py     | 105 +++-
 .../src/main/jython/radish/terrain.py           |   9 +-
 .../src/test/scripts/generate-all.groovy        |   4 +-
 .../src/test/scripts/test-server-start.groovy   |   2 +
 gremlin-test/features/branch/Repeat.feature     |  16 +
 gremlin-test/features/branch/Union.feature      |  16 +-
 gremlin-test/features/filter/Filter.feature     |  24 +
 gremlin-test/features/filter/Has.feature        | 479 ++++++++++++++++++-
 gremlin-test/features/filter/Range.feature      |   4 +-
 gremlin-test/features/filter/Where.feature      | 221 +++++++++
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++-
 gremlin-test/features/map/Match.feature         | 315 ++++++++++++
 gremlin-test/features/map/Min.feature           |  11 +
 gremlin-test/features/map/Order.feature         | 193 ++++++++
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 195 +++++++-
 gremlin-test/features/sideEffect/Inject.feature |  17 +
 gremlin-test/features/sideEffect/Sack.feature   |  42 +-
 .../features/sideEffect/SideEffectCap.feature   |   8 +-
 .../traversal/step/branch/LocalTest.java        |   2 +-
 .../traversal/step/branch/RepeatTest.java       |   2 +-
 .../traversal/step/branch/UnionTest.java        |   4 +-
 .../process/traversal/step/filter/AndTest.java  |   4 +-
 .../traversal/step/filter/FilterTest.java       |   9 +-
 .../process/traversal/step/filter/HasTest.java  |  43 +-
 .../traversal/step/filter/WhereTest.java        |  10 +-
 .../traversal/step/map/AddVertexTest.java       |  27 +-
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    | 120 ++++-
 38 files changed, 2036 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index e3c92f3,69af86f..5f331cb
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@@ -37,12 -37,28 +37,32 @@@ namespace Gremlin.Net.IntegrationTest.G
  {
      public class GherkinTestRunner
      {
 -        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
 -            { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
 -        };
 +        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios =
 +            new Dictionary<string, IgnoreReason>
 +            {
 +                { "g_V_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported },
-                 { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported }
++                { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported },
++                { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
 +            };
          
          private static class Keywords
          {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 915a069,0179994..7733f34
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@@ -43,9 -43,9 +43,12 @@@ namespace Gremlin.Net.IntegrationTest.G
                  case IgnoreReason.LambdaNotSupported:
                      reasonSuffix = " because lambdas are not supported in Gremlin.NET";
                      break;
 +                case IgnoreReason.TraversalTDeserializationNotSupported:
 +                    reasonSuffix = " as deserialization of g:T on GraphSON3 is not supported";
 +                    break;
+                 case IgnoreReason.NeedsFurtherInvestigation:
+                     reasonSuffix = " as further investigation is required";
+                     break;
              }
              return $"Scenario ignored" + reasonSuffix;
          }
@@@ -53,14 -53,7 +56,19 @@@
      
      public enum IgnoreReason
      {
 +        /// <summary>
 +        /// Lambdas are not supported on Gremlin.NET yet.
 +        /// </summary>
          LambdaNotSupported,
-         
++
 +        /// <summary>
 +        /// Deserialization of g:T on GraphSON3 is not supported.
 +        /// </summary>
-         TraversalTDeserializationNotSupported
++        TraversalTDeserializationNotSupported,
++
++        /// <summary>
++        /// Problem not yet classified and needs additional review.
++        /// </summary>
+         NeedsFurtherInvestigation
      }
  }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --cc gremlin-python/src/main/jython/radish/feature_steps.py
index 3de641e,3ba88a2..e29607d
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@@ -36,10 -36,20 +36,22 @@@ regex_or = re.compile(r"([(.,\s])or\("
  regex_true = re.compile(r"(true)")
  regex_false = re.compile(r"(false)")
  
+ outV = __.outV
+ label = __.label
+ inV = __.inV
+ project = __.project
+ tail = __.tail
  
  ignores = [
-     "g.V(v1Id).out().inject(v2).values(\"name\")"  # bug in attachment won't connect v2
-            ]
+     "g.V(v1Id).out().inject(v2).values(\"name\")",  # bug in attachment won't connect v2
+     # TINKERPOP-1859 - for the following...seems to be related to P.not processing
+     "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")",
+     "g.V(v1Id).out().aggregate(\"x\").out().where(P.not(P.within(\"x\")))",
+     "g.V().as(\"a\").out().as(\"b\").where(__.and(__.as(\"a\").out(\"knows\").as(\"b\"), __.or(__.as(\"b\").out(\"created\").has(\"name\", \"ripple\"), __.as(\"b\").in(\"knows\").count().is(P.not(P.eq(0)))))).select(\"a\", \"b\")",
 -    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")"
 -           ]
++    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")",
++    # not sure yet
++    "g.V(v1).hasLabel(\"person\").map(l1).order(Scope.local).by(Column.values, Order.decr).by(Column.keys, Order.incr)"
++    ]
  
  
  @given("the {graph_name:w} graph")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --cc gremlin-python/src/main/jython/radish/terrain.py
index d5a4c16,4db443e..ba8f372
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@@ -17,10 -17,8 +17,9 @@@ specific language governing permission
  under the License.
  '''
  
- import re
  from gremlin_python.structure.graph import Graph
  from gremlin_python.process.graph_traversal import __
 +from gremlin_python.driver import serializer
  from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
  from radish import before, after, world
  

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-server/src/test/scripts/test-server-start.groovy
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/scripts/test-server-start.groovy
index 00ebb59,1cb2c53..1e2b012
--- a/gremlin-server/src/test/scripts/test-server-start.groovy
+++ b/gremlin-server/src/test/scripts/test-server-start.groovy
@@@ -30,7 -30,8 +30,8 @@@ settings.graphs.classic = gremlinServer
  settings.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settings.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settings.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+ settings.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 -settings.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 +settings.scriptEngines["gremlin-groovy"].plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"].files = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
  if (Boolean.parseBoolean(python)) {
      settings.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
      settings.scriptEngines["gremlin-jython"] = new Settings.ScriptEngineSettings()
@@@ -58,7 -50,8 +59,8 @@@ settingsSecure.graphs.classic = gremlin
  settingsSecure.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settingsSecure.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settingsSecure.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+ settingsSecure.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 -settingsSecure.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 +settingsSecure.scriptEngines["gremlin-groovy"].plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"].files = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
  if (Boolean.parseBoolean(python)) {
      settingsSecure.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
      settingsSecure.scriptEngines["gremlin-jython"] = new Settings.ScriptEngineSettings()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/features/filter/Range.feature
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------


[39/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'


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

Branch: refs/heads/TINKERPOP-1777
Commit: 90e40e38c67969db31db333918990c56911e102b
Parents: 8fc7260 5b4bd00
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 24 11:51:48 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 24 11:51:48 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 216 +++++++++++++++++++-
 1 file changed, 215 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/90e40e38/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------


[49/50] tinkerpop git commit: Updated .net/js to 3.4.0-SNAPSHOT

Posted by dk...@apache.org.
Updated .net/js to 3.4.0-SNAPSHOT


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

Branch: refs/heads/TINKERPOP-1777
Commit: 05c1c047219186d53104de81e787124e26ec5638
Parents: c99ac1f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 09:06:48 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 09:06:48 2018 -0500

----------------------------------------------------------------------
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj              | 6 +++---
 .../src/main/javascript/gremlin-javascript/package.json        | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/05c1c047/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
index 397b6a6..7d07e71 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
@@ -25,9 +25,9 @@ limitations under the License.
   </PropertyGroup>
 
   <PropertyGroup Label="Package">
-    <Version>3.3.2-SNAPSHOT</Version>
-    <FileVersion>3.3.2.0</FileVersion>
-    <AssemblyVersion>3.3.0.0</AssemblyVersion>
+    <Version>3.4.0-SNAPSHOT</Version>
+    <FileVersion>3.4.0.0</FileVersion>
+    <AssemblyVersion>3.4.0.0</AssemblyVersion>
     <Title>Gremlin.Net</Title>
     <Authors>Apache TinkerPop</Authors>
     <Description>Gremlin.Net for Apache TinkerPopâ„¢ is a language variant and driver for .NET.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/05c1c047/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
index b9e7cdd..71b58b2 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
@@ -1,6 +1,6 @@
 {
   "name": "gremlin-javascript",
-  "version": "3.3.2-alpha1",
+  "version": "3.4.0-alpha1",
   "description": "JavaScript Gremlin Language Variant",
   "author": "Apache TinkerPop team",
   "keywords": [


[36/50] tinkerpop git commit: Merge branch 'TINKERPOP-1726' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1726' into tp32


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

Branch: refs/heads/TINKERPOP-1777
Commit: d9705644360763e7eff139358ae864c314925bd9
Parents: 3df6c58 1281878
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 23 07:02:24 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 23 07:02:24 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc | 13 +++--
 .../upgrade/release-3.2.x-incubating.asciidoc   | 15 ++++++
 .../driver/handler/WebSocketClientHandler.java  |  5 +-
 gremlin-server/conf/gremlin-server-classic.yaml |  2 +
 .../conf/gremlin-server-modern-py.yaml          |  2 +
 .../conf/gremlin-server-modern-readonly.yaml    |  2 +
 gremlin-server/conf/gremlin-server-modern.yaml  |  2 +
 gremlin-server/conf/gremlin-server-neo4j.yaml   |  2 +
 gremlin-server/conf/gremlin-server-secure.yaml  |  2 +
 gremlin-server/conf/gremlin-server-spark.yaml   |  2 +
 gremlin-server/conf/gremlin-server.yaml         |  2 +
 .../gremlin/server/AbstractChannelizer.java     | 14 ++++-
 .../tinkerpop/gremlin/server/Channelizer.java   | 17 ++++++
 .../tinkerpop/gremlin/server/GremlinServer.java | 11 +++-
 .../tinkerpop/gremlin/server/Settings.java      | 18 ++++++-
 .../server/channel/WebSocketChannelizer.java    | 11 ++++
 .../server/channel/WsAndHttpChannelizer.java    | 28 +++++-----
 .../server/handler/OpSelectorHandler.java       | 35 +++++++++++++
 .../handler/WsAndHttpChannelizerHandler.java    | 11 +++-
 .../server/GremlinServerIntegrateTest.java      | 55 +++++++++++++++++++-
 .../gremlin/util/Log4jRecordingAppender.java    |  5 +-
 .../util/Log4jRecordingAppenderTest.java        |  2 +-
 .../remote/gremlin-server-integration.yaml      |  2 +
 .../server/gremlin-server-integration.yaml      |  2 +
 .../server/gremlin-server-performance.yaml      |  2 +
 26 files changed, 232 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


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


[22/50] tinkerpop git commit: TINKERPOP-1726 updated changelog

Posted by dk...@apache.org.
TINKERPOP-1726 updated changelog


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

Branch: refs/heads/TINKERPOP-1777
Commit: a4bf93798fd16061069816eb75b958de9f731ca4
Parents: 6cb73c7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 08:23:37 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 08:23:37 2018 -0500

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a4bf9379/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f516f7b..69d402f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,7 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
-* Added `idleReadLimit` and `idleWriteLimit` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients.
+* Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` construction by the builder.
 * Improved error messaging for failed serialization and deserialization of request/response messages.


[07/50] tinkerpop git commit: TINKERPOP-1857 Added the new "sink" test for GLVs

Posted by dk...@apache.org.
TINKERPOP-1857 Added the new "sink" test for GLVs

This involved adding "sink" infrastructure to the test server configuration and including it in the gherkin setups for each GLV


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

Branch: refs/heads/TINKERPOP-1777
Commit: 7212253e6ff962232c906705c14fa95067fd11b9
Parents: 58d9382
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 14 11:17:15 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/ScenarioData.cs                         |  2 +-
 .../gremlin-javascript/test/cucumber/world.js       |  2 +-
 gremlin-python/src/main/jython/radish/terrain.py    |  4 ++--
 gremlin-server/src/test/scripts/generate-all.groovy |  4 +++-
 .../src/test/scripts/test-server-start.groovy       |  2 ++
 gremlin-test/features/branch/Repeat.feature         | 16 ++++++++++++++++
 6 files changed, 25 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
index ed767d5..77552f9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
@@ -42,7 +42,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
         private static readonly Regex EdgeLRegex = new Regex("l=(.+?)[,}]", RegexOptions.Compiled);
         private static readonly Regex EdgeIRegex = new Regex("i=(.+?)[,}]", RegexOptions.Compiled);
         
-        private static readonly string[] GraphNames = {"modern", "classic", "crew", "grateful"};
+        private static readonly string[] GraphNames = {"modern", "classic", "crew", "grateful", "sink"};
 
         private static readonly IDictionary<string, Vertex> EmptyVertices =
             new ReadOnlyDictionary<string, Vertex>(new Dictionary<string, Vertex>());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
index ae3f9a6..f531720 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
@@ -68,7 +68,7 @@ defineSupportCode(function (methods) {
 
   methods.BeforeAll(function () {
     // load all traversals
-    const promises = ['modern', 'classic', 'crew', 'grateful', 'empty'].map(graphName => {
+    const promises = ['modern', 'classic', 'crew', 'grateful', 'sink', 'empty'].map(graphName => {
       let connection = null;
       if (graphName === 'empty') {
         connection = helper.getConnection('ggraph');

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/terrain.py b/gremlin-python/src/main/jython/radish/terrain.py
index 9aed647..4db443e 100644
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@ -34,7 +34,7 @@ def prepare_static_traversal_source(features, marker):
     # as the various traversal sources for testing do not change their data, there is no need to re-create remotes
     # and client side lookup data over and over. it can be created once for all tests and be reused.
     cache = {}
-    for graph_name in (("modern", "gmodern"), ("classic", "gclassic"), ("crew", "gcrew"), ("grateful", "ggrateful")):
+    for graph_name in (("modern", "gmodern"), ("classic", "gclassic"), ("crew", "gcrew"), ("grateful", "ggrateful"), ("sink", "gsink")):
         cache[graph_name[0]] = {}
         remote = __create_remote(graph_name[1])
         cache[graph_name[0]]["remote_conn"] = __create_remote(graph_name[1])
@@ -52,7 +52,7 @@ def prepare_static_traversal_source(features, marker):
             scenario.context.lookup_v = {}
             scenario.context.lookup_e = {}
 
-            for graph_name in ("modern", "classic", "crew", "grateful"):
+            for graph_name in ("modern", "classic", "crew", "grateful", "sink"):
                 scenario.context.remote_conn[graph_name] = cache[graph_name]["remote_conn"]
                 scenario.context.lookup_v[graph_name] = cache[graph_name]["lookup_v"]
                 scenario.context.lookup_e[graph_name] = cache[graph_name]["lookup_e"]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-server/src/test/scripts/generate-all.groovy
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/scripts/generate-all.groovy b/gremlin-server/src/test/scripts/generate-all.groovy
index b6be405..108ca5d 100644
--- a/gremlin-server/src/test/scripts/generate-all.groovy
+++ b/gremlin-server/src/test/scripts/generate-all.groovy
@@ -27,6 +27,7 @@ globals << [hook : [
     TinkerFactory.generateClassic(classic)
     TinkerFactory.generateModern(modern)
     TinkerFactory.generateTheCrew(crew)
+    TinkerFactory.generateKitchenSink(sink)
     grateful.io(gryo()).readGraph('data/grateful-dead.kryo')
   }
 ] as LifeCycleHook]
@@ -37,4 +38,5 @@ globals << [gmodern : modern.traversal()]
 globals << [gcrew : crew.traversal()]
 globals << [ggraph : graph.traversal()]
 globals << [g : modern.traversal()]
-globals << [ggrateful : grateful.traversal()]
\ No newline at end of file
+globals << [ggrateful : grateful.traversal()]
+globals << [gsink : sink.traversal()]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-server/src/test/scripts/test-server-start.groovy
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/scripts/test-server-start.groovy b/gremlin-server/src/test/scripts/test-server-start.groovy
index 157f01c..1cb2c53 100644
--- a/gremlin-server/src/test/scripts/test-server-start.groovy
+++ b/gremlin-server/src/test/scripts/test-server-start.groovy
@@ -30,6 +30,7 @@ settings.graphs.classic = gremlinServerDir + "/src/test/scripts/tinkergraph-empt
 settings.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settings.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settings.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+settings.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settings.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 if (Boolean.parseBoolean(python)) {
     settings.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
@@ -49,6 +50,7 @@ settingsSecure.graphs.classic = gremlinServerDir + "/src/test/scripts/tinkergrap
 settingsSecure.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settingsSecure.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settingsSecure.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+settingsSecure.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settingsSecure.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 if (Boolean.parseBoolean(python)) {
     settingsSecure.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-test/features/branch/Repeat.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Repeat.feature b/gremlin-test/features/branch/Repeat.feature
index 009c380..6175519 100644
--- a/gremlin-test/features/branch/Repeat.feature
+++ b/gremlin-test/features/branch/Repeat.feature
@@ -228,3 +228,19 @@ Feature: Step - repeat()
       | josh  |
       | created |
       | ripple  |
+
+  Scenario: g_V_hasXloop_name_loopX_repeatXinX_timesX5X_path_by_name
+    Given the sink graph
+    And the traversal of
+      """
+      g.V().has("loops","name","loop").repeat(__.in()).times(5).path().by("name")
+      """
+    When iterated next
+    Then the result should be unordered
+      | result |
+      | loop |
+      | loop |
+      | loop  |
+      | loop |
+      | loop  |
+      | loop  |


[30/50] tinkerpop git commit: Merge branch 'TINKERPOP-1857' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1857' into tp32


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

Branch: refs/heads/TINKERPOP-1777
Commit: d42d54d6afbcb8fb8187a6472eccfe1b41d53d1b
Parents: 545f3bf 7212253
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 13:46:53 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:46:53 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                |  24 +-
 .../Gherkin/IgnoreException.cs                  |   6 +-
 .../Gherkin/ScenarioData.cs                     |   2 +-
 .../step/map/GroovyAddVertexTest.groovy         |   5 -
 .../lib/driver/driver-remote-connection.js      |  35 ++
 .../test/cucumber/feature-steps.js              |   7 +
 .../gremlin-javascript/test/cucumber/world.js   |   2 +-
 gremlin-python/glv/TraversalSource.template     |  14 +-
 .../jython/gremlin_python/process/traversal.py  |  14 +-
 .../src/main/jython/radish/feature_steps.py     | 101 +++-
 .../src/main/jython/radish/terrain.py           |  11 +-
 .../src/test/scripts/generate-all.groovy        |   4 +-
 .../src/test/scripts/test-server-start.groovy   |   2 +
 gremlin-test/features/branch/Repeat.feature     |  16 +
 gremlin-test/features/branch/Union.feature      |  16 +-
 gremlin-test/features/filter/Filter.feature     |  24 +
 gremlin-test/features/filter/Has.feature        | 479 ++++++++++++++++++-
 gremlin-test/features/filter/Range.feature      |   4 +-
 gremlin-test/features/filter/Where.feature      | 221 +++++++++
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++-
 gremlin-test/features/map/Match.feature         | 315 ++++++++++++
 gremlin-test/features/map/Min.feature           |  11 +
 gremlin-test/features/map/Order.feature         | 193 ++++++++
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 195 +++++++-
 gremlin-test/features/sideEffect/Inject.feature |  17 +
 gremlin-test/features/sideEffect/Sack.feature   |  42 +-
 .../features/sideEffect/SideEffectCap.feature   |   8 +-
 .../traversal/step/branch/LocalTest.java        |   2 +-
 .../traversal/step/branch/RepeatTest.java       |   2 +-
 .../traversal/step/branch/UnionTest.java        |   4 +-
 .../process/traversal/step/filter/AndTest.java  |   4 +-
 .../traversal/step/filter/FilterTest.java       |   9 +-
 .../process/traversal/step/filter/HasTest.java  |  43 +-
 .../traversal/step/filter/WhereTest.java        |  10 +-
 .../traversal/step/map/AddVertexTest.java       |  27 +-
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    | 120 ++++-
 39 files changed, 2030 insertions(+), 146 deletions(-)
----------------------------------------------------------------------



[17/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'


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

Branch: refs/heads/TINKERPOP-1777
Commit: 369dfa5a466d86bf91cc0daa1f9d5a607d0c34a4
Parents: 041bb3f d63aaa8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 15 09:45:37 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 15 09:45:37 2018 -0500

----------------------------------------------------------------------
 docs/src/recipes/centrality.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------



[45/50] tinkerpop git commit: Added upgrade docs CTR

Posted by dk...@apache.org.
Added upgrade docs CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: 1b7fba3f589283a1a4165bef8b95e53def36d505
Parents: 12e7f7e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 08:47:58 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 08:47:58 2018 -0500

----------------------------------------------------------------------
 docs/src/upgrade/release-3.4.x.asciidoc | 30 ++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b7fba3f/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
new file mode 100644
index 0000000..ff7b458
--- /dev/null
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -0,0 +1,30 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+
+= TinkerPop 3.4.0
+
+NEED AN IMAGE
+
+*NOT NAMED YET*
+
+== TinkerPop 3.4.0
+
+*NOT OFFICIALLY RELEASED YET*
+
+Please see the link:https://github.com/apache/tinkerpop/blob/3.4.0/CHANGELOG.asciidoc#release-3-4-0[changelog] for a complete list of all the modifications that are part of this release.
+
+=== Upgrading for Users


[41/50] tinkerpop git commit: Updated dev docs for release candidates CTR

Posted by dk...@apache.org.
Updated dev docs for release candidates CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: 072f112df0faff4d8e78772e73c8b708e184a44b
Parents: 5b4bd00
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 24 16:00:37 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 24 16:00:37 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/release.asciidoc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/072f112d/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index 44afe8f..fab9819 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -135,7 +135,8 @@ of the published documentation on the dev mailing list.
 
 A release candidate is an unofficial release that is represented by a tagged version in the Git repository.  It is
 offered in cases where there is significant change in a particular version and the potential for upgrades and problems
-might be high.
+might be high. Release candidates do not require a vote thread. Lazy consensus is acceptable for confirming their
+deployment.
 
 . `mvn clean install -DincludeNeo4j`
 .. `mvn verify -DskipIntegrationTests=false -DincludeNeo4j`
@@ -153,6 +154,14 @@ might be high.
 . Announce the release candidate to `dev` mailing list and await feedback
 . Repeat as required or proceed to the next phase
 
+Note that release candidates need not require the release of all artifacts. For example, if the risk is with one
+particular GLV, then a release candidate can be prepared of just that particular artifact. In those cases, a tag on
+the commit that represents the release candidate is sufficient and does not necessarily require that the versions
+be bumped to reflect the actual "-rc" version. In other words, if preparing a release candidate for .NET, then there
+is no need to go through the processing of bumping versions in Java artifacts and all GLVs. Nor is it necessary to
+alter the version of .NET to include the release candidate versioning. It can simply be altered locally by the
+release manager and deployed.
+
 == PMC Vote
 
 This section describes the process that process that prepares a release for VOTE by the community. If there are multiple


[37/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'

Conflicts:
	docs/src/reference/gremlin-applications.asciidoc
	gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
	gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
	gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
	gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
	gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml


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

Branch: refs/heads/TINKERPOP-1777
Commit: 8fc726037a967eee9c04645e3376b3c44d2b8dfe
Parents: d683206 d970564
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 23 07:41:44 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 23 07:41:44 2018 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc | 13 +++--
 .../upgrade/release-3.2.x-incubating.asciidoc   | 15 ++++++
 .../driver/handler/WebSocketClientHandler.java  |  5 +-
 gremlin-server/conf/gremlin-server-classic.yaml |  2 +
 .../conf/gremlin-server-modern-py.yaml          |  2 +
 .../conf/gremlin-server-modern-readonly.yaml    |  2 +
 gremlin-server/conf/gremlin-server-modern.yaml  |  2 +
 gremlin-server/conf/gremlin-server-neo4j.yaml   |  2 +
 gremlin-server/conf/gremlin-server-secure.yaml  |  2 +
 gremlin-server/conf/gremlin-server-spark.yaml   |  2 +
 gremlin-server/conf/gremlin-server.yaml         |  2 +
 .../gremlin/server/AbstractChannelizer.java     | 14 ++++-
 .../tinkerpop/gremlin/server/Channelizer.java   | 17 ++++++
 .../tinkerpop/gremlin/server/GremlinServer.java | 11 +++-
 .../tinkerpop/gremlin/server/Settings.java      | 18 +++++++
 .../server/channel/WebSocketChannelizer.java    | 11 ++++
 .../server/channel/WsAndHttpChannelizer.java    | 28 +++++-----
 .../server/handler/OpSelectorHandler.java       | 35 +++++++++++++
 .../handler/WsAndHttpChannelizerHandler.java    | 11 +++-
 .../server/GremlinServerIntegrateTest.java      | 55 +++++++++++++++++++-
 .../gremlin/util/Log4jRecordingAppender.java    |  5 +-
 .../util/Log4jRecordingAppenderTest.java        |  2 +-
 .../remote/gremlin-server-integration.yaml      |  2 +
 .../server/gremlin-server-integration.yaml      |  2 +
 25 files changed, 231 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 7fa52a5,60e0ef4..d54b880
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -274,9 -25,9 +274,10 @@@ image::https://raw.githubusercontent.co
  
  * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.
  * Added the "Kitchen Sink" test data set.
+ * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients.
  * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits.
  * Delayed setting of the request identifier until `RequestMessage` construction by the builder.
 +* `ReferenceElement` avoids `UnsupportedOperationException` handling in construction thus improving performance.
  * Improved error messaging for failed serialization and deserialization of request/response messages.
  * Removed hardcoded expectation in metrics serialization test suite as different providers may have different outputs.
  * Added `IndexedTraverserSet` which indexes on the value of a `Traverser` thus improving performance when used.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --cc docs/src/reference/gremlin-applications.asciidoc
index efc2c80,380ff4e..53a1642
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@@ -1768,8 -1594,10 +1769,10 @@@ The following sections define best prac
  
  image:gremlin-handdrawn.png[width=120,float=right] Tuning Gremlin Server for a particular environment may require some simple trial-and-error, but the following represent some basic guidelines that might be useful:
  
- * Gremlin Server defaults to a very modest maximum heap size.  Consider increasing this value for non-trivial uses.  Maximum heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.conf`.
- * When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a maximum of `2*number of cores`.
+ * Gremlin Server defaults to a very modest maximum heap size.  Consider increasing this value for non-trivial uses.
 -Maximum heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.sh`.
++Maximum heap size (`-Xmx`) is defined with the `JAVA_OPTIONS` setting in `gremlin-server.conf`.
+ * When configuring the size of `threadPoolWorker` start with the default of `1` and increment by one as needed to a
+ maximum of `2*number of cores`.
  * The "right" size of the `gremlinPool` setting is somewhat dependent on the type of scripts that will be processed
  by Gremlin Server.  As requests arrive to Gremlin Server they are decoded and queued to be processed by threads in
  this pool.  When this pool is exhausted of threads, Gremlin Server will continue to accept incoming requests, but

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server-classic.yaml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server-modern-py.yaml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server-modern-readonly.yaml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server-modern.yaml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server-neo4j.yaml
----------------------------------------------------------------------
diff --cc gremlin-server/conf/gremlin-server-neo4j.yaml
index 43b1e80,f88001c..3b74c31
--- a/gremlin-server/conf/gremlin-server-neo4j.yaml
+++ b/gremlin-server/conf/gremlin-server-neo4j.yaml
@@@ -48,8 -51,12 +48,10 @@@ metrics: 
    consoleReporter: {enabled: true, interval: 180000},
    csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
    jmxReporter: {enabled: true},
 -  slf4jReporter: {enabled: true, interval: 180000},
 -  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
 -  graphiteReporter: {enabled: false, interval: 180000}}
 +  slf4jReporter: {enabled: true, interval: 180000}}
  strictTransactionManagement: false
+ idleConnectionTimeout: 0
+ keepAliveInterval: 0
  maxInitialLineLength: 4096
  maxHeaderSize: 8192
  maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server-secure.yaml
----------------------------------------------------------------------
diff --cc gremlin-server/conf/gremlin-server-secure.yaml
index aa847d8,42a7785..6c77ad1
--- a/gremlin-server/conf/gremlin-server-secure.yaml
+++ b/gremlin-server/conf/gremlin-server-secure.yaml
@@@ -47,8 -54,12 +47,10 @@@ metrics: 
    consoleReporter: {enabled: true, interval: 180000},
    csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
    jmxReporter: {enabled: true},
 -  slf4jReporter: {enabled: true, interval: 180000},
 -  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
 -  graphiteReporter: {enabled: false, interval: 180000}}
 +  slf4jReporter: {enabled: true, interval: 180000}}
  strictTransactionManagement: false
+ idleConnectionTimeout: 0
+ keepAliveInterval: 0
  maxInitialLineLength: 4096
  maxHeaderSize: 8192
  maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server-spark.yaml
----------------------------------------------------------------------
diff --cc gremlin-server/conf/gremlin-server-spark.yaml
index 0d8a63c,bf7d32b..8d7d322
--- a/gremlin-server/conf/gremlin-server-spark.yaml
+++ b/gremlin-server/conf/gremlin-server-spark.yaml
@@@ -61,8 -64,12 +61,10 @@@ metrics: 
    consoleReporter: {enabled: true, interval: 180000},
    csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
    jmxReporter: {enabled: true},
 -  slf4jReporter: {enabled: true, interval: 180000},
 -  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
 -  graphiteReporter: {enabled: false, interval: 180000}}
 +  slf4jReporter: {enabled: true, interval: 180000}}
  strictTransactionManagement: false
+ idleConnectionTimeout: 0
+ keepAliveInterval: 0
  maxInitialLineLength: 4096
  maxHeaderSize: 8192
  maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/conf/gremlin-server.yaml
----------------------------------------------------------------------
diff --cc gremlin-server/conf/gremlin-server.yaml
index f81e25f,050d9d8..db7386c
--- a/gremlin-server/conf/gremlin-server.yaml
+++ b/gremlin-server/conf/gremlin-server.yaml
@@@ -38,8 -41,12 +38,10 @@@ metrics: 
    consoleReporter: {enabled: true, interval: 180000},
    csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
    jmxReporter: {enabled: true},
 -  slf4jReporter: {enabled: true, interval: 180000},
 -  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
 -  graphiteReporter: {enabled: false, interval: 180000}}
 +  slf4jReporter: {enabled: true, interval: 180000}}
  strictTransactionManagement: false
+ idleConnectionTimeout: 0
+ keepAliveInterval: 0
  maxInitialLineLength: 4096
  maxHeaderSize: 8192
  maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index b2931f6,edea752..e7f299b
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@@ -22,10 -23,11 +22,11 @@@ import io.netty.handler.ssl.SslContext
  import io.netty.handler.ssl.SslContextBuilder;
  import io.netty.handler.ssl.SslProvider;
  import io.netty.handler.ssl.util.SelfSignedCertificate;
+ import io.netty.handler.timeout.IdleStateHandler;
  import org.apache.tinkerpop.gremlin.driver.MessageSerializer;
  import org.apache.tinkerpop.gremlin.driver.ser.AbstractGryoMessageSerializerV1d0;
 -import org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0;
 -import org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0;
 +import org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0;
 +import org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0;
  import org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor;
  import org.apache.tinkerpop.gremlin.server.auth.Authenticator;
  import org.apache.tinkerpop.gremlin.server.handler.AbstractAuthenticationHandler;
@@@ -95,8 -99,10 +96,9 @@@ public abstract class AbstractChanneliz
  
      protected final Map<String, MessageSerializer> serializers = new HashMap<>();
  
+     private IdleStateHandler idleStateHandler;
      private OpSelectorHandler opSelectorHandler;
      private OpExecutorHandler opExecutorHandler;
 -    private IteratorHandler iteratorHandler;
  
      protected Authenticator authenticator;
  
@@@ -134,8 -140,9 +136,8 @@@
          authenticator = createAuthenticator(settings.authentication);
  
          // these handlers don't share any state and can thus be initialized once per pipeline
-         opSelectorHandler = new OpSelectorHandler(settings, graphManager, gremlinExecutor, scheduledExecutorService);
+         opSelectorHandler = new OpSelectorHandler(settings, graphManager, gremlinExecutor, scheduledExecutorService, this);
          opExecutorHandler = new OpExecutorHandler(settings, graphManager, gremlinExecutor, scheduledExecutorService);
 -        iteratorHandler = new IteratorHandler(settings);
      }
  
      @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
index 31c65c1,15fb7d3..01987fc
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Channelizer.java
@@@ -34,5 -35,22 +34,22 @@@ public interface Channelizer extends Ch
      /**
       * This method is called just after the {@code Channelizer} is initialized.
       */
 -    public void init(final ServerGremlinExecutor<EventLoopGroup> serverGremlinExecutor);
 +    public void init(final ServerGremlinExecutor serverGremlinExecutor);
+ 
+     /**
+      * Create a message to send to seemingly dead clients to see if they respond back. The message sent will be
+      * dependent on the implementation. For example, a websocket implementation would create a "ping" message.
+      * This method will only be used if {@link #supportsIdleMonitor()} is {@code true}.
+      */
+     public default Object createIdleDetectionMessage() {
+         return null;
+     }
+ 
+     /**
+      * Determines if the channelizer supports a method for keeping the connection alive and auto-closing zombie
+      * channels.
+      */
+     public default boolean supportsIdleMonitor() {
+         return false;
+     }
  }

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

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
index 081e336,a6ec20b..157263b
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WebSocketChannelizer.java
@@@ -18,6 -18,8 +18,7 @@@
   */
  package org.apache.tinkerpop.gremlin.server.channel;
  
 -import io.netty.channel.EventLoopGroup;
+ import io.netty.handler.codec.http.websocketx.PingWebSocketFrame;
  import org.apache.tinkerpop.gremlin.server.AbstractChannelizer;
  import org.apache.tinkerpop.gremlin.server.auth.AllowAllAuthenticator;
  import org.apache.tinkerpop.gremlin.server.handler.AbstractAuthenticationHandler;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
index 45e601e,de65bb9..0f14293
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
@@@ -18,12 -18,17 +18,15 @@@
   */
  package org.apache.tinkerpop.gremlin.server.handler;
  
 -import com.codahale.metrics.Meter;
+ import io.netty.handler.timeout.IdleState;
+ import io.netty.handler.timeout.IdleStateEvent;
  import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
  import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
  import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
  import org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor;
+ import org.apache.tinkerpop.gremlin.server.Channelizer;
  import org.apache.tinkerpop.gremlin.server.Context;
  import org.apache.tinkerpop.gremlin.server.GraphManager;
 -import org.apache.tinkerpop.gremlin.server.GremlinServer;
  import org.apache.tinkerpop.gremlin.server.OpProcessor;
  import org.apache.tinkerpop.gremlin.server.Settings;
  import org.apache.tinkerpop.gremlin.server.op.OpLoader;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/WsAndHttpChannelizerHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
index 4a9ebd4,82c14ac..abb6864
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/util/Log4jRecordingAppender.java
@@@ -63,16 -60,8 +63,17 @@@ public class Log4jRecordingAppender ext
          messages.clear();
      }
  
-     public boolean logContainsAny(final String fragment) {
-         return messages.stream().anyMatch(m -> m.contains(fragment));
+     public boolean logContainsAny(final String regex) {
+         // chop off the line feed so that the regex doesn't have to account for that
+         return messages.stream().anyMatch(m -> m.substring(0,m.length() - 1).matches(regex));
      }
 -}
 +
 +    public boolean logContainsAny(final String loggerName, final Level level, final String fragment) {
 +        return events.stream().anyMatch(m -> m.getLoggerName().equals(loggerName) &&
 +                m.getLevel().equals(level) && m.getMessage().toString().contains(fragment));
 +    }
 +    public boolean logMatchesAny(final String loggerName, final Level level, final String regex) {
 +        return events.stream().anyMatch(m -> m.getLoggerName().equals(loggerName) &&
 +                m.getLevel().equals(level) && m.getMessage().toString().matches(regex));
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fc72603/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
----------------------------------------------------------------------


[28/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'

Conflicts:
	gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py


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

Branch: refs/heads/TINKERPOP-1777
Commit: de45df4f34138b939d1e818d547707c40869434f
Parents: 4772d7d 545f3bf
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 13:35:34 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:35:34 2018 -0500

----------------------------------------------------------------------
 .../jython/gremlin_python/driver/driver_remote_connection.py   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[05/50] tinkerpop git commit: TINKERPOP-1857 Added new GLV min() test that came in after rebase

Posted by dk...@apache.org.
TINKERPOP-1857 Added new GLV min() test that came in after rebase


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

Branch: refs/heads/TINKERPOP-1777
Commit: 2735643fb1811be3426900d2df64795430f9eedf
Parents: ade1daf
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 1 13:33:12 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Min.feature | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2735643f/gremlin-test/features/map/Min.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Min.feature b/gremlin-test/features/map/Min.feature
index 203a6f1..99d53dd 100644
--- a/gremlin-test/features/map/Min.feature
+++ b/gremlin-test/features/map/Min.feature
@@ -49,3 +49,14 @@ Feature: Step - min()
     Then the result should be unordered
       | result |
       | m[{"ripple":"d[1.0].d","lop":"d[0.2].d"}] |
+
+  Scenario: g_V_foo_injectX9999999999X_min
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").inject(9999999999L).min()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[9999999999].l |


[29/50] tinkerpop git commit: This closes #796

Posted by dk...@apache.org.
This closes #796


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

Branch: refs/heads/TINKERPOP-1777
Commit: 90437441e8f0aa5293503fea2844dc77d976ee27
Parents: de45df4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 13:36:41 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:36:41 2018 -0500

----------------------------------------------------------------------

----------------------------------------------------------------------



[21/50] tinkerpop git commit: TINKERPOP-1726 Renamed settings to idleConnectionTimeout and keepAliveInterval

Posted by dk...@apache.org.
TINKERPOP-1726 Renamed settings to idleConnectionTimeout and keepAliveInterval


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

Branch: refs/heads/TINKERPOP-1777
Commit: 6cb73c70bec0f867a3b6b60a674da73b0f4ea176
Parents: 10ab334
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 08:22:04 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 08:22:04 2018 -0500

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc          |  4 ++--
 docs/src/upgrade/release-3.2.x-incubating.asciidoc        | 10 +++++-----
 .../tinkerpop/gremlin/server/AbstractChannelizer.java     |  2 +-
 .../org/apache/tinkerpop/gremlin/server/Settings.java     | 10 +++++-----
 .../gremlin/server/handler/OpSelectorHandler.java         |  4 ++--
 .../gremlin/server/GremlinServerIntegrateTest.java        |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 2413bdb..e84961c 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1073,8 +1073,8 @@ The following table describes the various configuration options that Gremlin Ser
 |graphs |A `Map` of `Graph` configuration files where the key of the `Map` becomes the name to which the `Graph` will be bound and the value is the file name of a `Graph` configuration file. |_none_
 |gremlinPool |The number of "Gremlin" threads available to execute actual scripts in a `ScriptEngine`. This pool represents the workers available to handle blocking operations in Gremlin Server. When set to `0`, Gremlin Server will use the value provided by `Runtime.availableProcessors()`. |0
 |host |The name of the host to bind the server to. |localhost
-|idleReadLimit |Time in milliseconds that the server will allow a channel to not receive requests from a client before it automatically closes. If enabled, the value provided should typically exceed the amount of time given to `idleWriteLimit`. Set this value to `0` to disable this feature. |0
-|idleWriteLimit |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the {@link #idleReadLimit} and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleReadLimit`. Set this value to `0` to disable this feature. |0
+|idleConnectionTimeout |Time in milliseconds that the server will allow a channel to not receive requests from a client before it automatically closes. If enabled, the value provided should typically exceed the amount of time given to `idleWriteLimit`. Set this value to `0` to disable this feature. |0
+|keepAliveInterval |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the `#idleConnectionTimeout` and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleConnectionTimeout`. Set this value to `0` to disable this feature. |0
 |maxAccumulationBufferComponents |Maximum number of request components that can be aggregated for a message. |1024
 |maxChunkSize |The maximum length of the content or each chunk.  If the content length exceeds this value, the transfer encoding of the decoded request will be converted to 'chunked' and the content will be split into multiple `HttpContent` objects.  If the transfer encoding of the HTTP request is 'chunked' already, each chunk will be split into smaller chunks if the length of the chunk exceeds this value. |8192
 |maxContentLength |The maximum length of the aggregated content for a message.  Works in concert with `maxChunkSize` where chunked requests are accumulated back into a single message.  A request exceeding this size will return a `413 - Request Entity Too Large` status code.  A response exceeding this size will raise an internal exception. |65536

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/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 f623127..7d2a80c 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -31,11 +31,11 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.2.8/CHANGELOG.asc
 
 ==== Improved Connection Monitoring
 
-Gremlin Server now has two new settings: `idleReadLimit` and `idleWriteLimit`. The `idleWriteLimit` tells Gremlin
-Server how long it should wait between writes to a client before it issues a "ping" to that client to see if it is
-still present. The `idleReadLimit` represents how long Gremlin Server should wait between requests from a client before
-it closes the connection on the server side. By default, these two configurations are set to zero, meaning that they
-are both disabled.
+Gremlin Server now has two new settings: `idleConnectionTimeout` and `keepAliveInterval`. The `keepAliveInterval` tells
+Gremlin Server how long it should wait between writes to a client before it issues a "ping" to that client to see if
+it is still present. The `idleConnectionTimeout` represents how long Gremlin Server should wait between requests from
+a client before it closes the connection on the server side. By default, these two configurations are set to zero,
+meaning that they are both disabled.
 
 This change should help to alleviate issues where connections are left open on the server longer than they should be
 by clients that might mysteriously disappear without properly closing their connections.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index 0bc4e00..bfb9660 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@ -154,7 +154,7 @@ public abstract class AbstractChannelizer extends ChannelInitializer<SocketChann
         // checks for no activity on a channel and triggers an event that is consumed by the OpSelectorHandler
         // and either closes the connection or sends a ping to see if the client is still alive
         if (supportsIdleMonitor())
-            pipeline.addLast(new IdleStateHandler((int) (settings.idleReadLimit / 1000), (int) (settings.idleWriteLimit / 1000),0));
+            pipeline.addLast(new IdleStateHandler((int) (settings.idleConnectionTimeout / 1000), (int) (settings.keepAliveInterval / 1000),0));
 
         // the implementation provides the method by which Gremlin Server will process requests.  the end of the
         // pipeline must decode to an incoming RequestMessage instances and encode to a outgoing ResponseMessage

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/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 75466ca..ec2eaf9 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
@@ -166,17 +166,17 @@ public class Settings {
     /**
      * Time in milliseconds that the server will allow a channel to not receive requests from a client before it
      * automatically closes. If enabled, the value provided should typically exceed the amount of time given to
-     * {@link #idleWriteLimit}. Set this value to 0 to disable this feature.
+     * {@link #keepAliveInterval}. Set this value to 0 to disable this feature.
      */
-    public long idleReadLimit = 0;
+    public long idleConnectionTimeout = 0;
 
     /**
      * Time in milliseconds that the server will allow a channel to not send responses to a client before it sends
      * a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will
-     * thus reset the {@link #idleReadLimit} and keep the channel open. If enabled, this number should be smaller than
-     * the value provided to the {@link #idleReadLimit}. Set this value to 0 to disable this feature.
+     * thus reset the {@link #idleConnectionTimeout} and keep the channel open. If enabled, this number should be smaller than
+     * the value provided to the {@link #idleConnectionTimeout}. Set this value to 0 to disable this feature.
      */
-    public long idleWriteLimit = 0;
+    public long keepAliveInterval = 0;
 
     /**
      * If set to {@code true} the {@code aliases} option is required on requests and Gremlin Server will use that

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
index 8bb9c44..de65bb9 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
@@ -126,10 +126,10 @@ public class OpSelectorHandler extends MessageToMessageDecoder<RequestMessage> {
             // periodically ping the server, but coming from this direction allows the server to kill channels that
             // have dead clients on the other end
             if (e.state() == IdleState.READER_IDLE) {
-                logger.info("Closing channel - client is disconnected after idle period of " + settings.idleReadLimit + " " + ctx.channel());
+                logger.info("Closing channel - client is disconnected after idle period of " + settings.idleConnectionTimeout + " " + ctx.channel());
                 ctx.close();
             } else if (e.state() == IdleState.WRITER_IDLE) {
-                logger.info("Checking channel - sending ping to client after idle period of " + settings.idleWriteLimit + " " + ctx.channel());
+                logger.info("Checking channel - sending ping to client after idle period of " + settings.keepAliveInterval + " " + ctx.channel());
                 ctx.writeAndFlush(channelizer.createIdleDetectionMessage());
             }
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 55912e1..033c847 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -251,7 +251,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
                 settings.scriptEvaluationTimeout = 500;
                 break;
             case "shouldPingChannelIfClientDies":
-                settings.idleWriteLimit = 1000;
+                settings.keepAliveInterval = 1000;
                 break;
         }
 


[08/50] tinkerpop git commit: TINKERPOP-1857 Ignored a few failing tests for purpose of this issue

Posted by dk...@apache.org.
TINKERPOP-1857 Ignored a few failing tests for purpose of this issue

Will create a new issue specific to the JS GLV to resolve these ignored tests.


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

Branch: refs/heads/TINKERPOP-1777
Commit: 58d93820e654a2c81c85c13ea9134b7ea0d459f2
Parents: 2af6040
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 14 10:46:58 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../gremlin-javascript/test/cucumber/feature-steps.js           | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d93820/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 9e12818..2bb6ef0 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -55,11 +55,16 @@ const parsers = [
 
 const ignoreReason = {
   lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript',
+  needsFurtherInvestigation: '',
 };
 
 const ignoredScenarios = {
   // An associative array containing the scenario name as key, for example:
   // 'g_V_branchXlabel_eq_person': new IgnoreError(ignoreReason.lambdaNotSupported),
+  'g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name': new IgnoreError(ignoreReason.needsFurtherInvestigation),
+  'g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
+  'g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
+  'g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
 };
 
 defineSupportCode(function(methods) {


[11/50] tinkerpop git commit: TINKERPOP-1857 Removed duplicate test in select() GLV tests

Posted by dk...@apache.org.
TINKERPOP-1857 Removed duplicate test in select() GLV tests


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

Branch: refs/heads/TINKERPOP-1777
Commit: bdd5e4c25c16dbea08f6127e9d12dffc3397f818
Parents: 97d4511
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 9 09:44:25 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Select.feature | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bdd5e4c2/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 94c4f22..d77e21f 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -338,7 +338,7 @@ Feature: Step - select()
       | marko |
       | marko |
 
-  Scenario: get_g_V_outE_weight_groupCount_selectXkeysX_unfold
+  Scenario: g_V_outE_weight_groupCount_selectXkeysX_unfold
     Given the modern graph
     And the traversal of
       """
@@ -514,18 +514,4 @@ Feature: Step - select()
     Then the result should be unordered
       | result |
       | d[2].l |
-      | d[2].l |
-
-  Scenario: g_V_outE_weight_groupCount_selectXkeysX_unfold
-    Given the modern graph
-    And the traversal of
-      """
-      g.V().outE().values("weight").groupCount().select(Column.keys).unfold()
-      """
-    When iterated to list
-    Then the result should be unordered
-      | result |
-      | d[0.5].f |
-      | d[1.0].f |
-      | d[0.4].f |
-      | d[0.2].f |
\ No newline at end of file
+      | d[2].l |
\ No newline at end of file


[16/50] tinkerpop git commit: TINKERPOP-1357 Added pageRank step to centrality recipes

Posted by dk...@apache.org.
TINKERPOP-1357 Added pageRank step to centrality recipes

While not really a "recipe", it's worth letting people know who are reading about centrality that there is an easy way to do PageRank calculations. CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: d63aaa852bfc605b3ddee5d1471097a724279cd0
Parents: 2d7113a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 15 09:44:12 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 15 09:44:12 2018 -0500

----------------------------------------------------------------------
 docs/src/recipes/centrality.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d63aaa85/docs/src/recipes/centrality.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/centrality.asciidoc b/docs/src/recipes/centrality.asciidoc
index 9a21636..1a3927e 100644
--- a/docs/src/recipes/centrality.asciidoc
+++ b/docs/src/recipes/centrality.asciidoc
@@ -174,3 +174,17 @@ traversal from taking longer than one hundred milliseconds to execute (the previ
 than that). While the answer provided with the `timeLimit()` is not the absolute ranking, it does provide a relative
 ranking that closely matches the absolute one. The use of `timeLimit()` in certain algorithms (e.g. recommendations)
 can shorten the time required to get a reasonable and usable result.
+
+[[pagerank-centrality]]
+=== PageRank Centrality
+
+While not technically a recipe, it's worth noting here in the "Centrality Section" that
+link:https://en.wikipedia.org/wiki/PageRank[PageRank] centrality can be calculated with Gremlin with the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#pagerank-step[pageRank()]-step which is designed to work with
+`GraphComputer` (OLAP) based traversals.
+
+[gremlin-groovy,modern]
+----
+g = graph.traversal().withComputer()
+g.V().pageRank().by('pageRank').values('pageRank')
+----


[13/50] tinkerpop git commit: TINKERPOP-1857 sack() inject() cap() GLV tests

Posted by dk...@apache.org.
TINKERPOP-1857 sack() inject() cap() GLV tests


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

Branch: refs/heads/TINKERPOP-1777
Commit: 5db5f2188137c8088f3433910cf48f6bb1e2eb6b
Parents: 4351977
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 6 10:55:14 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     |  3 +-
 gremlin-test/features/sideEffect/Inject.feature | 17 ++++++++
 gremlin-test/features/sideEffect/Sack.feature   | 42 +++++++++++++++++++-
 .../features/sideEffect/SideEffectCap.feature   |  8 ++--
 .../gremlin/process/FeatureCoverageTest.java    | 15 +++++--
 5 files changed, 76 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 7c0525f..3ba88a2 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -21,7 +21,7 @@ import json
 import re
 from gremlin_python.structure.graph import Graph, Path
 from gremlin_python.process.graph_traversal import __
-from gremlin_python.process.traversal import Cardinality, P, Pop, Scope, Column, Order, Direction, T, Pick, Operator
+from gremlin_python.process.traversal import Barrier, Cardinality, P, Pop, Scope, Column, Order, Direction, T, Pick, Operator
 from radish import given, when, then
 from hamcrest import *
 
@@ -253,6 +253,7 @@ def _translate(traversal):
 def _make_traversal(g, traversal_string, params):
     b = {"g": g,
          "__": __,
+         "Barrier": Barrier,
          "Cardinality": Cardinality,
          "Column": Column,
          "Direction": Direction,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/features/sideEffect/Inject.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/Inject.feature b/gremlin-test/features/sideEffect/Inject.feature
index 61ffb58..740928d 100644
--- a/gremlin-test/features/sideEffect/Inject.feature
+++ b/gremlin-test/features/sideEffect/Inject.feature
@@ -49,3 +49,20 @@ Feature: Step - inject()
       | p[v[marko],v[lop],lop,d[3].i] |
       | p[v[marko],v[vadas],vadas,d[5].i] |
       | p[v[marko],v[josh],josh,d[4].i] |
+
+  Scenario: g_VX1X_injectXg_VX4XX_out_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v4 defined as "v[josh]"
+    And the traversal of
+      """
+      g.V(v1Id).inject(v4).out().values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | ripple |
+      | lop   |
+      | lop   |
+      | vadas |
+      | josh  |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/features/sideEffect/Sack.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/Sack.feature b/gremlin-test/features/sideEffect/Sack.feature
index 73e65da..f5baf64 100644
--- a/gremlin-test/features/sideEffect/Sack.feature
+++ b/gremlin-test/features/sideEffect/Sack.feature
@@ -68,4 +68,44 @@ Feature: Step - sack()
     Then nothing should happen because
       """
       This API is deprecated - will not test.
-      """
\ No newline at end of file
+      """
+
+  Scenario: g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.withBulk(false).withSack(1.0, Operator.sum).V(v1Id).local(__.outE("knows").barrier(Barrier.normSack).inV()).in("knows").barrier().sack()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1.0].d |
+
+  Scenario: g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.withBulk(false).withSack(1, Operator.sum).V().out().barrier().sack()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[3].l |
+      | d[1].l |
+      | d[1].l |
+      | d[1].l |
+
+  Scenario: g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.withSack(1.0, Operator.sum).V(v1Id).local(__.out("knows").barrier(Barrier.normSack)).in("knows").barrier().sack()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1.0].d |
+      | d[1.0].d |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/features/sideEffect/SideEffectCap.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/SideEffectCap.feature b/gremlin-test/features/sideEffect/SideEffectCap.feature
index 6be2fdb..795db7e 100644
--- a/gremlin-test/features/sideEffect/SideEffectCap.feature
+++ b/gremlin-test/features/sideEffect/SideEffectCap.feature
@@ -17,17 +17,17 @@
 
 Feature: Step - cap()
 
-  Scenario: g_V_group_byXnameX
+  Scenario: g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX
     Given the modern graph
     And the traversal of
       """
-      g.V().group().by("name")
+      g.V().has("age").groupCount("a").by("name").out().cap("a")
       """
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"ripple":"l[v[ripple]]", "vadas":"l[v[vadas]]", "lop":"l[v[lop]]", "peter": "l[v[peter]]", "josh": "l[v[josh]]", "marko":"l[v[marko]]"}] |
-    
+      | m[{"peter":"d[1].i", "vadas":"d[1].i", "josh":"d[1].i", "marko": "d[1].i"}] |
+
   Scenario: g_V_chooseXlabel_person__age_groupCountXaX__name_groupCountXbXX_capXa_bX
     Given an unsupported test
     Then nothing should happen because

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 9e6ca72..28c6d77 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -126,7 +126,16 @@ public class FeatureCoverageTest {
             "g_V_valueMap_selectXpop_a_bX",
             "g_V_selectXaX",
             // assertion doesn't seem to want to work right for embedded lists
-            "g_V_asXa_bX_out_asXcX_path_selectXkeysX");
+            "g_V_asXa_bX_out_asXcX_path_selectXkeysX",
+            // probably need TINKERPOP-1877
+            "g_V_bothEXselfX",
+            "g_V_bothXselfX",
+            // ugh - BigInteger?
+            "g_withSackXBigInteger_TEN_powX1000X_assignX_V_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack",
+            // ugh - clone
+            "g_withSackXmap__map_cloneX_V_out_out_sackXmap_a_nameX_sack",
+            // wont round right or something
+            "g_withSackX2X_V_sackXdivX_byXconstantX3_0XX_sack");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
@@ -192,7 +201,7 @@ public class FeatureCoverageTest {
                 InjectTest.class,
                 SackTest.class,
                 SideEffectCapTest.class,
-                SideEffectTest.class,
+                //SideEffectTest.class,
                 StoreTest.class);
                 // SubgraphTest.class,
                 // TreeTest.class);
@@ -214,7 +223,7 @@ public class FeatureCoverageTest {
                     .map(Method::getName).collect(Collectors.toSet());
 
             final File featureFile = new File(featureFileName);
-            assertThat(featureFile.exists(), is(true));
+            assertThat("Where is: " + featureFileName, featureFile.exists(), is(true));
             assertThat(featureFile.isFile(), is(true));
 
             final Set<String> testsInFeatureFile = new HashSet<>();


[25/50] tinkerpop git commit: TINKERPOP-1726 Minor fix to ascidoc format

Posted by dk...@apache.org.
TINKERPOP-1726 Minor fix to ascidoc format


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

Branch: refs/heads/TINKERPOP-1777
Commit: a082e63e6a999411fceb618c66d49e214ed52ff7
Parents: da48b74
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 10:56:29 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 10:56:29 2018 -0500

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a082e63e/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 5443ee2..380ff4e 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1074,7 +1074,7 @@ The following table describes the various configuration options that Gremlin Ser
 |gremlinPool |The number of "Gremlin" threads available to execute actual scripts in a `ScriptEngine`. This pool represents the workers available to handle blocking operations in Gremlin Server. When set to `0`, Gremlin Server will use the value provided by `Runtime.availableProcessors()`. |0
 |host |The name of the host to bind the server to. |localhost
 |idleConnectionTimeout |Time in milliseconds that the server will allow a channel to not receive requests from a client before it automatically closes. If enabled, the value provided should typically exceed the amount of time given to `keepAliveInterval`. Note that while this value is to be provided as milliseconds it will resolve to second precision. Set this value to `0` to disable this feature. |0
-|keepAliveInterval |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the `#idleConnectionTimeout` and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleConnectionTimeout`. Note that while this value is to be provided as milliseconds it will resolve to second precision. Set this value to `0` to disable this feature. |0
+|keepAliveInterval |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the `idleConnectionTimeout` and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleConnectionTimeout`. Note that while this value is to be provided as milliseconds it will resolve to second precision. Set this value to `0` to disable this feature. |0
 |maxAccumulationBufferComponents |Maximum number of request components that can be aggregated for a message. |1024
 |maxChunkSize |The maximum length of the content or each chunk.  If the content length exceeds this value, the transfer encoding of the decoded request will be converted to 'chunked' and the content will be split into multiple `HttpContent` objects.  If the transfer encoding of the HTTP request is 'chunked' already, each chunk will be split into smaller chunks if the length of the chunk exceeds this value. |8192
 |maxContentLength |The maximum length of the aggregated content for a message.  Works in concert with `maxChunkSize` where chunked requests are accumulated back into a single message.  A request exceeding this size will return a `413 - Request Entity Too Large` status code.  A response exceeding this size will raise an internal exception. |65536


[47/50] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by dk...@apache.org.
Merge branch 'tp32' into tp33

Conflicts:
	docs/src/dev/developer/for-committers.asciidoc


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

Branch: refs/heads/TINKERPOP-1777
Commit: 69a355f85cda60dd3c2fbaeb4b0608506d3945d8
Parents: 614c346 1a857da
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 08:52:16 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 08:52:16 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/69a355f8/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------


[04/50] tinkerpop git commit: TINKERPOP-1857 Fixed up union() and range() tests that were failing

Posted by dk...@apache.org.
TINKERPOP-1857 Fixed up union() and range() tests that were failing


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

Branch: refs/heads/TINKERPOP-1777
Commit: d556f77994712c3fb91ab09e08720ced273b4474
Parents: 68669ea
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jan 24 10:27:13 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/branch/Union.feature |  2 +-
 gremlin-test/features/filter/Range.feature | 26 +------------------------
 gremlin-test/features/filter/Where.feature | 26 +++++++++++++++++++++++++
 3 files changed, 28 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d556f779/gremlin-test/features/branch/Union.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Union.feature b/gremlin-test/features/branch/Union.feature
index 2380246..83318f6 100644
--- a/gremlin-test/features/branch/Union.feature
+++ b/gremlin-test/features/branch/Union.feature
@@ -145,7 +145,7 @@ Feature: Step - union()
     And using the parameter v2Id defined as "v[vadas].id"
     And the traversal of
       """
-      g.V(v1Id, v2Id).local(union(count()))
+      g.V(v1Id, v2Id).local(__.union(__.count()))
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d556f779/gremlin-test/features/filter/Range.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Range.feature b/gremlin-test/features/filter/Range.feature
index 066960a..18aae9f 100644
--- a/gremlin-test/features/filter/Range.feature
+++ b/gremlin-test/features/filter/Range.feature
@@ -225,28 +225,4 @@ Feature: Step - range()
     Then the result should be unordered
       | result |
       | m[{"b":"josh"}] |
-      | m[{"b":"josh"}] |
-
-  Scenario: g_V_repeatXbothX_timesX3X_rangeX5_11X
-    Given the modern graph
-    And the traversal of
-      """
-      g.V().repeat(both()).times(3).range(5, 11)
-      """
-    When iterated to list
-    Then the result should be ordered
-      | result |
-      | d[6].l |
-
-  Scenario: g_V_repeatXbothX_timesX3X_rangeX5_11X
-    Given the modern graph
-    And using the parameter v1Id defined as "v[marko].id"
-    And the traversal of
-      """
-      g.V(v1Id).out("created").inE("created").range(1, 3).outV()
-      """
-    When iterated to list
-    Then the result should be unordered
-      | result |
-      | v[marko] |
-      | v[ripple] |
\ No newline at end of file
+      | m[{"b":"josh"}] |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d556f779/gremlin-test/features/filter/Where.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Where.feature b/gremlin-test/features/filter/Where.feature
index 5c520da..c13703c 100644
--- a/gremlin-test/features/filter/Where.feature
+++ b/gremlin-test/features/filter/Where.feature
@@ -103,3 +103,29 @@ Feature: Step - where()
       | josh |
       | peter |
 
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").as("b").where("a", P.neq("b")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | josh |
+      | peter |
+
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXasXbX_outXcreatedX_hasXname_rippleXX_valuesXage_nameX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").as("b").where(__.as("b").out("created").has("name", "ripple")).values("age", "name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | josh |
+      | d[32].i |
+


[15/50] tinkerpop git commit: JavaScript GLV: handle responses without identifier and clear handler

Posted by dk...@apache.org.
JavaScript GLV: handle responses without identifier and clear handler


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

Branch: refs/heads/TINKERPOP-1777
Commit: 1e38023c7ebfb3ae83578625d9d99f60798abdcc
Parents: 10f29cb
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Wed Feb 14 16:11:13 2018 +0100
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../lib/driver/driver-remote-connection.js      | 35 ++++++++++++++++++++
 1 file changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1e38023c/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
index 5587fd6..d9e6000 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
@@ -126,7 +126,31 @@ class DriverRemoteConnection extends RemoteConnection {
 
   _handleMessage(data) {
     const response = this._reader.read(JSON.parse(data.toString()));
+    if (response.requestId === null || response.requestId === undefined) {
+        // There was a serialization issue on the server that prevented the parsing of the request id
+        // We invoke any of the pending handlers with an error
+        Object.keys(this._responseHandlers).forEach(requestId => {
+          const handler = this._responseHandlers[requestId];
+          this._clearHandler(requestId);
+          if (response.status !== undefined && response.status.message) {
+            return handler.callback(
+              new Error(util.format(
+                'Server error (no request information): %s (%d)', response.status.message, response.status.code)));
+          } else {
+            return handler.callback(new Error(util.format('Server error (no request information): %j', response)));
+          }
+        });
+        return;
+    }
+
     const handler = this._responseHandlers[response.requestId];
+
+    if (!handler) {
+      // The handler for a given request id was not found
+      // It was probably invoked earlier due to a serialization issue.
+      return;
+    }
+
     if (response.status.code >= 400) {
       // callback in error
       return handler.callback(
@@ -134,6 +158,7 @@ class DriverRemoteConnection extends RemoteConnection {
     }
     switch (response.status.code) {
       case responseStatusCode.noContent:
+        this._clearHandler(response.requestId);
         return handler.callback(null, { traversers: []});
       case responseStatusCode.partialContent:
         handler.result = handler.result || [];
@@ -146,11 +171,21 @@ class DriverRemoteConnection extends RemoteConnection {
         else {
           handler.result = response.result.data;
         }
+        this._clearHandler(response.requestId);
         return handler.callback(null, { traversers: handler.result });
     }
   }
 
   /**
+   * Clears the internal state containing the callback and result buffer of a given request.
+   * @param requestId
+   * @private
+   */
+  _clearHandler(requestId) {
+    delete this._responseHandlers[requestId];
+  }
+
+  /**
    * Closes the Connection.
    * @return {Promise}
    */


[10/50] tinkerpop git commit: TINKERPOP-1857 select() GLV tests

Posted by dk...@apache.org.
TINKERPOP-1857 select() GLV tests


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

Branch: refs/heads/TINKERPOP-1777
Commit: 43519778b0f0c71a93ff0d91efc153995e1ebec6
Parents: 314481e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 6 09:08:55 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     |   3 +-
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 209 ++++++++++++++++++-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    |  13 +-
 5 files changed, 224 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index e6392d5..7c0525f 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -21,7 +21,7 @@ import json
 import re
 from gremlin_python.structure.graph import Graph, Path
 from gremlin_python.process.graph_traversal import __
-from gremlin_python.process.traversal import Cardinality, P, Scope, Column, Order, Direction, T, Pick, Operator
+from gremlin_python.process.traversal import Cardinality, P, Pop, Scope, Column, Order, Direction, T, Pick, Operator
 from radish import given, when, then
 from hamcrest import *
 
@@ -259,6 +259,7 @@ def _make_traversal(g, traversal_string, params):
          "Order": Order,
          "P": P,
          "Pick": Pick,
+         "Pop": Pop,
          "Scope": Scope,
          "Operator": Operator,
          "T": T}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/features/map/Properties.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Properties.feature b/gremlin-test/features/map/Properties.feature
index 58a5531..3c926fa 100644
--- a/gremlin-test/features/map/Properties.feature
+++ b/gremlin-test/features/map/Properties.feature
@@ -51,18 +51,4 @@ Feature: Step - properties()
       | josh  |
       | d[32].i |
       | peter |
-      | d[35].i |
-
-  Scenario: g_V_hasXageX_properties_hasXid_nameIdX_value
-    Given an unsupported test
-    Then nothing should happen because
-      """
-      There is no way to currently get property identifiers on elements.
-      """
-
-  Scenario: g_V_hasXageX_propertiesXnameX
-    Given an unsupported test
-    Then nothing should happen because
-      """
-      There is no way to currently assert property elements in the test logic.
-      """
+      | d[35].i |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 06f00d2..94c4f22 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -321,4 +321,211 @@ Feature: Step - select()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"ripple":"d[1].l", "lop":"d[6].l"}] |
\ No newline at end of file
+      | m[{"ripple":"d[1].l", "lop":"d[6].l"}] |
+
+  Scenario: g_V_untilXout_outX_repeatXin_asXaXX_selectXaX_byXtailXlocalX_nameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().until(__.out().out()).repeat(__.in().as("a")).select("a").by(__.tail(Scope.local).values("name"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | marko |
+      | marko |
+      | marko |
+      | marko |
+
+  Scenario: get_g_V_outE_weight_groupCount_selectXkeysX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.keys).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0.5].f |
+      | d[1.0].f |
+      | d[0.4].f |
+      | d[0.2].f |
+
+  Scenario: g_V_hasLabelXsoftwareX_asXnameX_asXlanguageX_asXcreatorsX_selectXname_language_creatorsX_byXnameX_byXlangX_byXinXcreatedX_name_fold_orderXlocalXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("software").as("name").as("language").as("creators").select("name", "language", "creators").by("name").by("lang").
+                    by(__.in("created").values("name").fold().order(Scope.local))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name":"lop","language":"java","creators":["josh","marko","peter"]}] |
+      | m[{"name":"ripple","language":"java","creators":["josh"]}] |
+
+  Scenario: g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().unfold().select(Column.keys).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0.5].f |
+      | d[1.0].f |
+      | d[0.4].f |
+      | d[0.2].f |
+
+  Scenario: g_V_outE_weight_groupCount_unfold_selectXvaluesX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().unfold().select(Column.values).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1].l |
+      | d[2].l |
+      | d[2].l |
+      | d[1].l |
+
+  Scenario: g_V_untilXout_outX_repeatXin_asXaX_in_asXbXX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().until(__.out().out()).repeat(__.in().as("a").in().as("b")).select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"josh","b":"marko"}] |
+      | m[{"a":"josh","b":"marko"}] |
+
+  Scenario: g_V_outE_weight_groupCount_selectXvaluesX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.values).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1].l |
+      | d[2].l |
+      | d[2].l |
+      | d[1].l |
+
+  Scenario: g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("knows").as("b").select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[vadas]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]"}] |
+
+  Scenario: g_V_asXaX_whereXoutXknowsXX_selectXaX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").where(__.out("knows")).select("a")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+
+  Scenario: g_VX1X_asXaX_repeatXout_asXaXX_timesX2X_selectXfirst_aX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").repeat(__.out().as("a")).times(2).select(Pop.first, "a")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+      | v[marko] |
+
+  Scenario: g_V_asXaX_outXknowsX_asXbX_localXselectXa_bX_byXnameXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("knows").as("b").local(__.select("a", "b").by("name"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"marko","b":"vadas"}] |
+      | m[{"a":"marko","b":"josh"}] |
+
+  Scenario: g_VX1X_asXaX_repeatXout_asXaXX_timesX2X_selectXlast_aX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").repeat(__.out().as("a")).times(2).select(Pop.last, "a")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[ripple] |
+      | v[lop] |
+
+  Scenario: g_VX1X_outEXknowsX_asXhereX_hasXweight_1X_inV_hasXname_joshX_selectXhereX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).outE("knows").as("here").has("weight", 1.0).inV().has("name", "josh").select("here")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | e[marko-knows->josh] |
+
+  Scenario: g_V_asXaX_hasXname_markoX_asXbX_asXcX_selectXa_b_cX_by_byXnameX_byXageX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").has("name", "marko").as("b").as("c").select("a", "b", "c").by().by("name").by("age")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"marko","c":"d[29].i"}] |
+
+  Scenario: g_V_outE_weight_groupCount_selectXvaluesX_unfold_groupCount_selectXvaluesX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.values).unfold().groupCount().select(Column.values).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[2].l |
+      | d[2].l |
+
+  Scenario: g_V_outE_weight_groupCount_selectXkeysX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.keys).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0.5].f |
+      | d[1.0].f |
+      | d[0.4].f |
+      | d[0.2].f |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
index 6d07edf..c0486d0 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
@@ -567,7 +567,7 @@ public abstract class SelectTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_asXaX_whereXoutXknowsXX_selectXaX_byXnameX() {
+    public void g_V_asXaX_whereXoutXknowsXX_selectXaX() {
         final Traversal<Vertex, Vertex> traversal = get_g_V_asXaX_whereXoutXknowsXX_selectXaX();
         printTraversalForm(traversal);
         assertEquals(convertToVertex(graph, "marko"), traversal.next());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index b2a83d7..9e6ca72 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -104,6 +104,10 @@ public class FeatureCoverageTest {
             // deprecated tests
             "g_V_addVXlabel_animal_age_0X",
             "g_addVXlabel_person_name_stephenX",
+            // GLV suite doesn't support property identifiers and related assertions
+            "g_V_hasXageX_properties_hasXid_nameIdX_value",
+            "g_V_hasXageX_properties_hasXid_nameIdAsStringX_value",
+            "g_V_hasXageX_propertiesXnameX",
             // grateful dead graph not supported in GLV suite
             "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_d__c_sungBy_d__d_hasXname_GarciaXX",
             "g_V_matchXa_hasXsong_name_sunshineX__a_mapX0followedBy_weight_meanX_b__a_0followedBy_c__c_filterXweight_whereXgteXbXXX_outV_dX_selectXdX_byXnameX",
@@ -115,7 +119,14 @@ public class FeatureCoverageTest {
             "get_g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
             "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
             "g_V_hasXsong_name_OHBOYX_outXfollowedByX_outXfollowedByX_order_byXperformancesX_byXsongType_incrX",
-            "g_V_hasLabelXsongX_order_byXperfomances_decrX_byXnameX_rangeX110_120X_name");
+            "g_V_hasLabelXsongX_order_byXperfomances_decrX_byXnameX_rangeX110_120X_name",
+            // Pop tests not organized right for GLVs
+            "g_V_valueMap_selectXpop_aX",
+            "g_V_selectXa_bX",
+            "g_V_valueMap_selectXpop_a_bX",
+            "g_V_selectXaX",
+            // assertion doesn't seem to want to work right for embedded lists
+            "g_V_asXa_bX_out_asXcX_path_selectXkeysX");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")


[26/50] tinkerpop git commit: TINKERPOP=-1726 Just make it so that WsAndHttp supports idle monitor

Posted by dk...@apache.org.
TINKERPOP=-1726 Just make it so that WsAndHttp supports idle monitor


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

Branch: refs/heads/TINKERPOP-1777
Commit: 12818789d400e5a6830f4478fa67704eec08eb92
Parents: a082e63
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 13:19:12 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:19:12 2018 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12818789/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
index e415887..de521a3 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpChannelizer.java
@@ -49,7 +49,7 @@ public class WsAndHttpChannelizer extends AbstractChannelizer {
 
     @Override
     public boolean supportsIdleMonitor() {
-        return handler.getWsChannelizer().supportsIdleMonitor();
+        return true;
     }
 
     @Override


[23/50] tinkerpop git commit: TINKERPOP-1726 Added logging output for new settings

Posted by dk...@apache.org.
TINKERPOP-1726 Added logging output for new settings

This will help explain any confusion if users decide to set millisecond values under 1000 and end up with a zero value for the config option.


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

Branch: refs/heads/TINKERPOP-1777
Commit: 00e4235c4abbb6b34702abdfb14b63a02398d9b6
Parents: a4bf937
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 09:26:03 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 09:26:03 2018 -0500

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc         |  4 ++--
 gremlin-server/conf/gremlin-server-classic.yaml          |  4 ++--
 gremlin-server/conf/gremlin-server-modern-py.yaml        |  4 ++--
 gremlin-server/conf/gremlin-server-modern-readonly.yaml  |  4 ++--
 gremlin-server/conf/gremlin-server-modern.yaml           |  4 ++--
 gremlin-server/conf/gremlin-server-neo4j.yaml            |  4 ++--
 gremlin-server/conf/gremlin-server-secure.yaml           |  4 ++--
 gremlin-server/conf/gremlin-server-spark.yaml            |  4 ++--
 gremlin-server/conf/gremlin-server.yaml                  |  4 ++--
 .../tinkerpop/gremlin/server/AbstractChannelizer.java    |  7 +++++--
 .../apache/tinkerpop/gremlin/server/GremlinServer.java   | 11 ++++++++++-
 .../org/apache/tinkerpop/gremlin/server/Settings.java    |  8 +++++---
 .../driver/remote/gremlin-server-integration.yaml        |  4 ++--
 .../gremlin/server/gremlin-server-integration.yaml       |  4 ++--
 .../gremlin/server/gremlin-server-performance.yaml       |  4 ++--
 15 files changed, 44 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index e84961c..5443ee2 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1073,8 +1073,8 @@ The following table describes the various configuration options that Gremlin Ser
 |graphs |A `Map` of `Graph` configuration files where the key of the `Map` becomes the name to which the `Graph` will be bound and the value is the file name of a `Graph` configuration file. |_none_
 |gremlinPool |The number of "Gremlin" threads available to execute actual scripts in a `ScriptEngine`. This pool represents the workers available to handle blocking operations in Gremlin Server. When set to `0`, Gremlin Server will use the value provided by `Runtime.availableProcessors()`. |0
 |host |The name of the host to bind the server to. |localhost
-|idleConnectionTimeout |Time in milliseconds that the server will allow a channel to not receive requests from a client before it automatically closes. If enabled, the value provided should typically exceed the amount of time given to `idleWriteLimit`. Set this value to `0` to disable this feature. |0
-|keepAliveInterval |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the `#idleConnectionTimeout` and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleConnectionTimeout`. Set this value to `0` to disable this feature. |0
+|idleConnectionTimeout |Time in milliseconds that the server will allow a channel to not receive requests from a client before it automatically closes. If enabled, the value provided should typically exceed the amount of time given to `keepAliveInterval`. Note that while this value is to be provided as milliseconds it will resolve to second precision. Set this value to `0` to disable this feature. |0
+|keepAliveInterval |Time in milliseconds that the server will allow a channel to not send responses to a client before it sends a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will thus reset the `#idleConnectionTimeout` and keep the channel open. If enabled, this number should be smaller than the value provided to the `idleConnectionTimeout`. Note that while this value is to be provided as milliseconds it will resolve to second precision. Set this value to `0` to disable this feature. |0
 |maxAccumulationBufferComponents |Maximum number of request components that can be aggregated for a message. |1024
 |maxChunkSize |The maximum length of the content or each chunk.  If the content length exceeds this value, the transfer encoding of the decoded request will be converted to 'chunked' and the content will be split into multiple `HttpContent` objects.  If the transfer encoding of the HTTP request is 'chunked' already, each chunk will be split into smaller chunks if the length of the chunk exceeds this value. |8192
 |maxContentLength |The maximum length of the aggregated content for a message.  Works in concert with `maxChunkSize` where chunked requests are accumulated back into a single message.  A request exceeding this size will return a `413 - Request Entity Too Large` status code.  A response exceeding this size will raise an internal exception. |65536

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server-classic.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-classic.yaml b/gremlin-server/conf/gremlin-server-classic.yaml
index 6a7f3f4..29a3743 100644
--- a/gremlin-server/conf/gremlin-server-classic.yaml
+++ b/gremlin-server/conf/gremlin-server-classic.yaml
@@ -36,8 +36,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server-modern-py.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-modern-py.yaml b/gremlin-server/conf/gremlin-server-modern-py.yaml
index 726890d..aad52f8 100644
--- a/gremlin-server/conf/gremlin-server-modern-py.yaml
+++ b/gremlin-server/conf/gremlin-server-modern-py.yaml
@@ -51,8 +51,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 threadPoolBoss: 1
 maxInitialLineLength: 4096
 maxHeaderSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server-modern-readonly.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-modern-readonly.yaml b/gremlin-server/conf/gremlin-server-modern-readonly.yaml
index 6840e18..08ae3c0 100644
--- a/gremlin-server/conf/gremlin-server-modern-readonly.yaml
+++ b/gremlin-server/conf/gremlin-server-modern-readonly.yaml
@@ -36,8 +36,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server-modern.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-modern.yaml b/gremlin-server/conf/gremlin-server-modern.yaml
index 6ec3e23..ac690b1 100644
--- a/gremlin-server/conf/gremlin-server-modern.yaml
+++ b/gremlin-server/conf/gremlin-server-modern.yaml
@@ -36,8 +36,8 @@ serializers:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server-neo4j.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-neo4j.yaml b/gremlin-server/conf/gremlin-server-neo4j.yaml
index a1a32ca..f88001c 100644
--- a/gremlin-server/conf/gremlin-server-neo4j.yaml
+++ b/gremlin-server/conf/gremlin-server-neo4j.yaml
@@ -55,8 +55,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server-secure.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-secure.yaml b/gremlin-server/conf/gremlin-server-secure.yaml
index 771f31b..42a7785 100644
--- a/gremlin-server/conf/gremlin-server-secure.yaml
+++ b/gremlin-server/conf/gremlin-server-secure.yaml
@@ -58,8 +58,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server-spark.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-spark.yaml b/gremlin-server/conf/gremlin-server-spark.yaml
index 747845a..bf7d32b 100644
--- a/gremlin-server/conf/gremlin-server-spark.yaml
+++ b/gremlin-server/conf/gremlin-server-spark.yaml
@@ -68,8 +68,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/conf/gremlin-server.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server.yaml b/gremlin-server/conf/gremlin-server.yaml
index 6b61d4b..050d9d8 100644
--- a/gremlin-server/conf/gremlin-server.yaml
+++ b/gremlin-server/conf/gremlin-server.yaml
@@ -45,8 +45,8 @@ metrics: {
   gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
   graphiteReporter: {enabled: false, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index bfb9660..edea752 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@ -153,8 +153,11 @@ public abstract class AbstractChannelizer extends ChannelInitializer<SocketChann
 
         // checks for no activity on a channel and triggers an event that is consumed by the OpSelectorHandler
         // and either closes the connection or sends a ping to see if the client is still alive
-        if (supportsIdleMonitor())
-            pipeline.addLast(new IdleStateHandler((int) (settings.idleConnectionTimeout / 1000), (int) (settings.keepAliveInterval / 1000),0));
+        if (supportsIdleMonitor()) {
+            final int idleConnectionTimeout = (int) (settings.idleConnectionTimeout / 1000);
+            final int keepAliveInterval = (int) (settings.keepAliveInterval / 1000);
+            pipeline.addLast(new IdleStateHandler(idleConnectionTimeout, keepAliveInterval, 0));
+        }
 
         // the implementation provides the method by which Gremlin Server will process requests.  the end of the
         // pipeline must decode to an incoming RequestMessage instances and encode to a outgoing ResponseMessage

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/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 3c7b861..7aefbe6 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
@@ -216,7 +216,16 @@ public class GremlinServer {
         try {
             final Class clazz = Class.forName(settings.channelizer);
             final Object o = clazz.newInstance();
-            return (Channelizer) o;
+
+            final Channelizer c = (Channelizer) o;
+            if (c.supportsIdleMonitor()) {
+                logger.info("idleConnectionTimeout was set to {} which resolves to {} seconds when configuring this value - this feature will be {}",
+                        settings.idleConnectionTimeout, settings.idleConnectionTimeout / 1000, settings.idleConnectionTimeout < 1000 ? "disabled" : "enabled");
+                logger.info("keepAliveInterval was set to {} which resolves to {} seconds when configuring this value - this feature will be {}",
+                        settings.keepAliveInterval, settings.keepAliveInterval / 1000, settings.keepAliveInterval < 1000 ? "disabled" : "enabled");
+            }
+
+            return c;
         } catch (ClassNotFoundException cnfe) {
             logger.error("Could not find {} implementation defined by the 'channelizer' setting as: {}",
                     Channelizer.class.getName(), settings.channelizer);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/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 ec2eaf9..74a5a1a 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
@@ -166,15 +166,17 @@ public class Settings {
     /**
      * Time in milliseconds that the server will allow a channel to not receive requests from a client before it
      * automatically closes. If enabled, the value provided should typically exceed the amount of time given to
-     * {@link #keepAliveInterval}. Set this value to 0 to disable this feature.
+     * {@link #keepAliveInterval}. Note that while this value is to be provided as milliseconds it will resolve to
+     * second precision. Set this value to 0 to disable this feature.
      */
     public long idleConnectionTimeout = 0;
 
     /**
      * Time in milliseconds that the server will allow a channel to not send responses to a client before it sends
      * a "ping" to see if it is still present. If it is present, the client should respond with a "pong" which will
-     * thus reset the {@link #idleConnectionTimeout} and keep the channel open. If enabled, this number should be smaller than
-     * the value provided to the {@link #idleConnectionTimeout}. Set this value to 0 to disable this feature.
+     * thus reset the {@link #idleConnectionTimeout} and keep the channel open. If enabled, this number should be
+     * smaller than the value provided to the {@link #idleConnectionTimeout}. Note that while this value is to be
+     * provided as milliseconds it will resolve to second precision. Set this value to 0 to disable this feature.
      */
     public long keepAliveInterval = 0;
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
index e08973f..7b388aa 100644
--- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
+++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/driver/remote/gremlin-server-integration.yaml
@@ -44,8 +44,8 @@ processors:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
index b03e057..3b28020 100644
--- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
+++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
@@ -39,8 +39,8 @@ processors:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00e4235c/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
index a88b5a7..8ee9c79 100644
--- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
+++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml
@@ -36,8 +36,8 @@ processors:
 metrics: {
   slf4jReporter: {enabled: true, interval: 180000}}
 strictTransactionManagement: false
-idleReadLimit: 0
-idleWriteLimit: 0
+idleConnectionTimeout: 0
+keepAliveInterval: 0
 maxInitialLineLength: 4096
 maxHeaderSize: 8192
 maxChunkSize: 8192


[02/50] tinkerpop git commit: TINKERPOP-1857 Included GLV tests for addV()

Posted by dk...@apache.org.
TINKERPOP-1857 Included GLV tests for addV()


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

Branch: refs/heads/TINKERPOP-1777
Commit: 7a445844c2cdb0aede731e2d88a592dafebcf9e6
Parents: 784c3d1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 1 10:28:35 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 .../step/map/GroovyAddVertexTest.groovy         |   5 -
 .../src/main/jython/radish/feature_steps.py     |   2 +-
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++++++++++++++-
 .../traversal/step/map/AddVertexTest.java       |  27 +--
 .../gremlin/process/FeatureCoverageTest.java    |   7 +
 5 files changed, 174 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
index 00312fa..1956a7e 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
@@ -47,11 +47,6 @@ public abstract class GroovyAddVertexTest {
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX() {
-            new ScriptTraversal<>(g, "gremlin-groovy", "g.addV('person').property('name', 'stephen').property('name', 'stephenm')")
-        }
-
-        @Override
         public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX() {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.addV('person').property(VertexProperty.Cardinality.single, 'name', 'stephen').property(VertexProperty.Cardinality.single, 'name', 'stephenm')")
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 06a8ec9..e6392d5 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -135,7 +135,7 @@ def assert_side_effects(step, count, traversal_string):
 
     t = _make_traversal(step.context.g, traversal_string.replace('\\"', '"'),
                         step.context.traversal_params if hasattr(step.context, "traversal_params") else {})
-    assert_that(count, equal_to(t.count().next()))
+    assert_that(t.count().next(), equal_to(count))
 
 
 @then("the result should have a count of {count:d}")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-test/features/map/AddVertex.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/AddVertex.feature b/gremlin-test/features/map/AddVertex.feature
index 3335e29..2813733 100644
--- a/gremlin-test/features/map/AddVertex.feature
+++ b/gremlin-test/features/map/AddVertex.feature
@@ -144,4 +144,167 @@ Feature: Step - addV()
     Then the result should have a count of 1
     And the graph should return 0 for count of "g.V().has(\"person\",\"name\",\"stephen\")"
     And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\")"
-    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
\ No newline at end of file
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
+
+  Scenario: g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.V().has("name", "marko").property("friendWeight", __.outE("knows").values("weight").sum(), "acl", "private")
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").has(\"friendWeight\", 1.5)"
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").has(\"acl\",\"private\")"
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").count()"
+
+  Scenario: g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.addV("animal").property("name", "mateo").property("name", "gateo").property("name", "cateo").property("age", 5)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"mateo\").has(\"name\", \"gateo\").has(\"name\", \"cateo\").has(\"age\",5)"
+
+  Scenario: g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.withSideEffect("a", "marko").addV().property("name", __.select("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+    And the graph should return 2 for count of "g.V().has(\"name\",\"marko\")"
+
+  Scenario: g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.addV("person").property(Cardinality.single, "name", "stephen").property(Cardinality.single, "name", "stephenm", "since", 2010)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 0 for count of "g.V().has(\"name\",\"stephen\")"
+    And the graph should return 1 for count of "g.V().has(\"name\",\"stephenm\")"
+    And the graph should return 1 for count of "g.V().has(\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
+
+  Scenario: g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.V().addV("animal").property("name", __.values("name")).property("name", "an animal").property(__.values("name"), __.label())
+      """
+    When iterated to list
+    Then the result should have a count of 6
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"marko\").has(\"name\",\"an animal\").has(\"marko\",\"person\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"vadas\").has(\"name\",\"an animal\").has(\"vadas\",\"person\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"lop\").has(\"name\",\"an animal\").has(\"lop\",\"software\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"josh\").has(\"name\",\"an animal\").has(\"josh\",\"person\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"ripple\").has(\"name\",\"an animal\").has(\"ripple\",\"software\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"peter\").has(\"name\",\"an animal\").has(\"peter\",\"person\")"
+
+  Scenario: g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.withSideEffect("a", "test").V().hasLabel("software").property("temp", __.select("a")).valueMap("name", "temp")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"temp": ["test"], "name": ["lop"]}] |
+      | m[{"temp": ["test"], "name": ["ripple"]}] |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
index f43c612..d44b439 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
@@ -56,8 +56,6 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
 
     public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX();
 
-    public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX();
-
     public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX();
 
     public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X();
@@ -83,7 +81,7 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
     @LoadGraphWith(MODERN)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
-    public void g_V_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX() {
+    public void g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX() {
         final Traversal<Vertex, Vertex> traversal = get_g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX(convertToVertexId(graph, "marko"));
         printTraversalForm(traversal);
         final Vertex vertex = traversal.next();
@@ -133,22 +131,6 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
     @LoadGraphWith(MODERN)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
-    public void g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX();
-        printTraversalForm(traversal);
-        final Vertex stephen = traversal.next();
-        assertFalse(traversal.hasNext());
-        assertEquals("person", stephen.label());
-        assertThat((List<String>) IteratorUtils.asList(stephen.values("name")), containsInAnyOrder("stephen", "stephenm"));
-        assertEquals(2, IteratorUtils.count(stephen.properties()));
-        assertEquals(7, IteratorUtils.count(g.V()));
-    }
-
-    @Test
-    @LoadGraphWith(MODERN)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
     public void g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX() {
         final Traversal<Vertex, Vertex> traversal = get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX();
         printTraversalForm(traversal);
@@ -184,7 +166,7 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
     @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 = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
-    public void g_V_hasXname_markoX_addVXmetaPersonX_propertyXname_nameX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX() {
+    public void g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX() {
         final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX();
         printTraversalForm(traversal);
         final Vertex marko = traversal.next();
@@ -333,11 +315,6 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX() {
-            return g.addV("person").property("name", "stephen").property("name", "stephenm");
-        }
-
-        @Override
         public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX() {
             return g.addV("person").property(VertexProperty.Cardinality.single, "name", "stephen").property(VertexProperty.Cardinality.single, "name", "stephenm");
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 36b2b29..ff6156a 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -100,6 +100,12 @@ public class FeatureCoverageTest {
 
     private static Pattern scenarioName = Pattern.compile("^\\s*Scenario:\\s*(.*)$");
 
+    // g_V_addVXlabel_animal_age_0X - deprecated
+    // g_addVXlabel_person_name_stephenX - deprecated
+    private static final List<String> testToIgnore = Arrays.asList(
+            "g_V_addVXlabel_animal_age_0X",
+            "g_addVXlabel_person_name_stephenX");
+
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
     public void shouldImplementAllProcessTestsAsFeatures() throws Exception {
@@ -182,6 +188,7 @@ public class FeatureCoverageTest {
                                            t.getSimpleName().replace("Test", "") + ".feature";
             final Set<String> testMethods = Stream.of(t.getDeclaredMethods())
                     .filter(m -> m.isAnnotationPresent(Test.class))
+                    .filter(m -> !testToIgnore.contains(m.getName()))
                     .map(Method::getName).collect(Collectors.toSet());
 
             final File featureFile = new File(featureFileName);


[03/50] tinkerpop git commit: TINKERPOP-1857 Added where() GLV test

Posted by dk...@apache.org.
TINKERPOP-1857 Added where() GLV test


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

Branch: refs/heads/TINKERPOP-1777
Commit: 784c3d10dbe40a4acf7cac93abba03977631acb1
Parents: d556f77
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jan 24 12:14:01 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     |   6 +-
 gremlin-test/features/filter/Where.feature      | 195 +++++++++++++++++++
 .../traversal/step/filter/WhereTest.java        |  10 +-
 3 files changed, 205 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/784c3d10/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index c0574d0..06a8ec9 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -44,7 +44,11 @@ tail = __.tail
 
 ignores = [
     "g.V(v1Id).out().inject(v2).values(\"name\")",  # bug in attachment won't connect v2
-    "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")" # TINKERPOP-1859
+    # TINKERPOP-1859 - for the following...seems to be related to P.not processing
+    "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")",
+    "g.V(v1Id).out().aggregate(\"x\").out().where(P.not(P.within(\"x\")))",
+    "g.V().as(\"a\").out().as(\"b\").where(__.and(__.as(\"a\").out(\"knows\").as(\"b\"), __.or(__.as(\"b\").out(\"created\").has(\"name\", \"ripple\"), __.as(\"b\").in(\"knows\").count().is(P.not(P.eq(0)))))).select(\"a\", \"b\")",
+    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")"
            ]
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/784c3d10/gremlin-test/features/filter/Where.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Where.feature b/gremlin-test/features/filter/Where.feature
index c13703c..912edf2 100644
--- a/gremlin-test/features/filter/Where.feature
+++ b/gremlin-test/features/filter/Where.feature
@@ -129,3 +129,198 @@ Feature: Step - where()
       | josh |
       | d[32].i |
 
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_whereXeqXaXX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").where(P.eq("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").where(P.neq("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | peter |
+      | josh  |
+
+  Scenario: g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).out().aggregate("x").out().where(P.not(P.within("x")))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[ripple] |
+
+  Scenario: g_withSideEffectXa_g_VX2XX_VX1X_out_whereXneqXaXX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v2 defined as "v[vadas]"
+    And the traversal of
+      """
+      g.withSideEffect("a", v2).V(v1Id).out().where(P.neq("a"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[josh] |
+      | v[lop] |
+
+  Scenario: g_VX1X_repeatXbothEXcreatedX_whereXwithoutXeXX_aggregateXeX_otherVX_emit_path
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).repeat(__.bothE("created").where(P.without("e")).aggregate("e").otherV()).emit().path()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | p[v[marko],e[marko-created->lop],v[lop]] |
+      | p[v[marko],e[marko-created->lop],v[lop],e[josh-created->lop],v[josh]] |
+      | p[v[marko],e[marko-created->lop],v[lop],e[peter-created->lop],v[peter]] |
+      | p[v[marko],e[marko-created->lop],v[lop],e[josh-created->lop],v[josh],e[josh-created->ripple],v[ripple]] |
+
+  Scenario: g_V_whereXnotXoutXcreatedXXX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().where(__.not(__.out("created"))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | vadas |
+      | lop |
+      | ripple |
+
+  Scenario: g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").where(__.and(__.as("a").out("knows").as("b"), __.or(__.as("b").out("created").has("name", "ripple"), __.as("b").in("knows").count().is(P.not(P.eq(0)))))).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[vadas]"}] |
+      | m[{"a": "v[marko]", "b": "v[josh]"}] |
+
+  Scenario: g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().where(__.out("created").and().out("knows").or().in("knows")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | vadas |
+      | josh |
+
+  Scenario: g_V_asXaX_outXcreatedX_asXbX_whereXandXasXbX_in__notXasXaX_outXcreatedX_hasXname_rippleXXX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("created").as("b").where(__.and(__.as("b").in(), __.not(__.as("a").out("created").has("name", "ripple")))).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[lop]"}] |
+      | m[{"a": "v[peter]", "b": "v[lop]"}] |
+
+  Scenario: g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("created").as("b").in("created").as("c").both("knows").both("knows").as("d").where("c", P.not(P.eq("a").or(P.eq("d")))).select("a", "b", "c", "d")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[lop]", "c": "v[josh]", "d": "v[vadas]"}] |
+      | m[{"a": "v[peter]", "b": "v[lop]", "c": "v[josh]", "d": "v[vadas]"}] |
+
+  Scenario: g_V_asXaX_out_asXbX_whereXin_count_isXeqX3XX_or_whereXoutXcreatedX_and_hasXlabel_personXXX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").where(__.as("b").in().count().is(P.eq(3)).or().where(__.as("b").out("created").and().as("b").has(T.label, "person"))).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[lop]"}] |
+      | m[{"a": "v[marko]", "b": "v[josh]"}] |
+      | m[{"a": "v[josh]", "b": "v[lop]"}] |
+      | m[{"a": "v[peter]", "b": "v[lop]"}] |
+
+  Scenario: g_V_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_gtXbXX_byXageX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("created").in("created").as("b").where("a", P.gt("b")).by("age").select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "josh", "b": "marko"}] |
+      | m[{"a": "peter", "b": "marko"}] |
+      | m[{"a": "peter", "b": "josh"}] |
+
+  Scenario: g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").outE("created").as("b").inV().as("c").where("a", P.gt("b").or(P.eq("b"))).by("age").by("weight").by("weight").select("a", "c").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "marko", "c": "lop"}] |
+      | m[{"a": "josh", "c": "ripple"}] |
+      | m[{"a": "josh", "c": "lop"}] |
+      | m[{"a": "peter", "c": "lop"}] |
+
+  Scenario: g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").outE("created").as("b").inV().as("c").in("created").as("d").where("a", P.lt("b").or(P.gt("c")).and(P.neq("d"))).by("age").by("weight").by(__.in("created").values("age").min()).select("a", "c", "d").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "josh", "c": "lop", "d": "marko"}] |
+      | m[{"a": "josh", "c": "lop", "d": "peter"}] |
+      | m[{"a": "peter", "c": "lop", "d": "marko"}] |
+      | m[{"a": "peter", "c": "lop", "d": "josh"}] |
+
+  Scenario: g_VX1X_asXaX_out_hasXageX_whereXgtXaXX_byXageX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out().has("age").where(P.gt("a")).by("age").values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | josh |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/784c3d10/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
index af46bc9..f7e706e 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
@@ -263,7 +263,7 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VX1X_out_aggregateXxX_out_whereXwithout_xX() {
+    public void g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX() {
         final Traversal<Vertex, Vertex> traversal = get_g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX(convertToVertexId("marko"));
         printTraversalForm(traversal);
         assertEquals("ripple", traversal.next().<String>value("name"));
@@ -273,7 +273,7 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_withSideEffectXa_g_VX2XX_VX1X_out_whereXneqXaXX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(convertToVertexId("marko"), convertToVertexId("vadas"));
+        final Traversal<Vertex, Vertex> traversal = get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(convertToVertexId("marko"), g.V(convertToVertexId("vadas")).next());
         printTraversalForm(traversal);
         int counter = 0;
         final Set<Vertex> vertices = new HashSet<>();
@@ -324,7 +324,7 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_selectXaX_byXnameX() {
+    public void g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX() {
         final Traversal<Vertex, String> traversal = get_g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX();
         printTraversalForm(traversal);
         checkResults(Arrays.asList("marko", "vadas", "josh"), traversal);
@@ -471,8 +471,8 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(final Object v1Id, final Object v2Id) {
-            return g.withSideEffect("a", g.V(v2Id).next()).V(v1Id).out().where(neq("a"));
+        public Traversal<Vertex, Vertex> get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(final Object v1Id, final Object v2) {
+            return g.withSideEffect("a", v2).V(v1Id).out().where(neq("a"));
         }
 
         @Override


[19/50] tinkerpop git commit: Merge branch 'tp32'

Posted by dk...@apache.org.
Merge branch 'tp32'


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

Branch: refs/heads/TINKERPOP-1777
Commit: 4772d7d02a213acc7c7da98666938524d8c4f6e2
Parents: 369dfa5 bcffaad
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 15 09:46:52 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 15 09:46:52 2018 -0500

----------------------------------------------------------------------

----------------------------------------------------------------------



[48/50] tinkerpop git commit: Merge branch 'tp33'

Posted by dk...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/TINKERPOP-1777
Commit: c99ac1fdb5d459f0e4c6f135e7959957c40bf5f5
Parents: 1b7fba3 69a355f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 08:52:24 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 08:52:24 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[44/50] tinkerpop git commit: Updated changelog for 3.4.0-SNAPSHOT CTR

Posted by dk...@apache.org.
Updated changelog for 3.4.0-SNAPSHOT CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: 12e7f7e41c38762543c6bc0213e4f47e68fb8569
Parents: 0c10921
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 27 08:45:13 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 27 08:45:13 2018 -0500

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/12e7f7e4/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d54b880..d07fb13 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -16,6 +16,16 @@ limitations under the License.
 ////
 = TinkerPop3 CHANGELOG
 
+== TinkerPop 3.4.0 (NOT NAMED YET)
+
+NEED AND IMAGE
+
+[[release-3-4-0]]
+=== TinkerPop 3.4.0 (Release Date: NOT OFFICIALLY RELEASED YET)
+
+This release also includes changes from <<release-3-3-2, 3.3.2>>.
+
+
 == TinkerPop 3.3.0 (Gremlin Symphony #40 in G Minor)
 
 image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/gremlin-mozart.png[width=185]


[38/50] tinkerpop git commit: Added some docs about Gherkin tests CTR

Posted by dk...@apache.org.
Added some docs about Gherkin tests CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: 5b4bd0074f5547ecb9b08a751a3b7b0988835ed8
Parents: d970564
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Feb 24 11:51:27 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Feb 24 11:51:27 2018 -0500

----------------------------------------------------------------------
 docs/src/dev/developer/for-committers.asciidoc | 216 +++++++++++++++++++-
 1 file changed, 215 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5b4bd007/docs/src/dev/developer/for-committers.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 14fa90a..b44de9a 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -174,7 +174,14 @@ for an example.
 
 === Gremlin Language Test Cases
 
-When writing a test case for a Gremlin step, be sure to use the following conventions.
+Test cases for the Gremlin Language currently requires that the newly developed test be added in three places:
+
+1. As a test written in Java in the `gremlin-test` module within the subpackages of
+`org.apache.tinkerpop.gremlin.process.traversal.step`
+2. As a test written in Groovy in the `gremlin-groovy-test` module within the same subpackage structure as `gremlin-test`
+3. As a test written in Gherkin in the `gremlin-test` module in the `/features` subdirectory
+
+When writing a Java test case for a Gremlin step, be sure to use the following conventions.
 
 * The name of the traversal generator should start with `get`, use `X` for brackets, `_` for space, and the Gremlin-Groovy sugar syntax.
 ** `get_g_V_hasLabelXpersonX_groupXaX_byXageX_byXsumX_name()`
@@ -189,6 +196,213 @@ When writing a test case for a Gremlin step, be sure to use the following conven
 ** `checkResults(Arrays.asList("marko","josh"), traversal)`
 ** `checkMap(new HashMap<String,Long>() {{ put("marko",1l); }}, traversal.next())`
 
+Groovy tests are implemented by extending the Java test and implementing the abstract method that produces the
+traversal. Simply follow existing patterns in those tests - they are self-evident.
+
+Gherkin tests follow some important conventions and have a sub-language that must be adhered to for the tests to
+function properly. Note that Gherkin tests are designed to support the testing of GLVs and at some point will likely
+replace the Java tests (Groovy tests have already been removed in 3.3.x). If a new Java test is added and an associated
+Gherkin tests is not, the overall build will fail the `FeatureCoverageTest` of `gremlin-test` which validates that all
+tests written in Java are also implemented in Gherkin.
+
+The basic syntax of a Gherkin test is as follows:
+
+[source,gherkin]
+----
+Scenario: g_VX1X_unionXrepeatXoutX_timesX2X__outX_name
+  Given the modern graph
+  And using the parameter v1Id defined as "v[marko].id"
+  And the traversal of
+    """
+    g.V(v1Id).union(__.repeat(__.out()).times(2), __.out()).values("name")
+    """
+  When iterated to list
+  Then the result should be unordered
+    | result |
+    | ripple |
+    | lop |
+    | lop   |
+    | vadas |
+    | josh  |
+----
+
+==== Scenario Name
+
+The name of the scenario needs to match the name of the Java test. If it does not then the `FeatureCoverageTest` will
+fail.
+
+==== Given
+
+"Given" sets the context of the test. Specifically, it establishes the graph that will be used for the test. It
+conforms to the pattern of "Given the _xxx_ graph" where the "xxx" may be one of the following:
+
+* empty
+* modern
+* classic
+* crew
+* sink
+* grateful
+
+Never modify the data of any of the graphs except for the "empty" graph. The "empty" graph is the only graph that is
+guaranteed to be refreshed between tests. The "empty" graph maybe be modified by the traversal under test or by an
+additional "Given" option:
+
+[source,gherkin]
+----
+Given the empty graph
+And the graph initializer of
+  """
+  g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+    addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+    addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+    addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+    addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+    addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+    addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+    addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+    addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+    addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+    addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+    addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+  """
+----
+
+The above configuration will use the "empty" graph and initialize it with the specified traversal. In this case, that
+traversal loads the "empty" graph with the "modern" graph.
+
+Once the graph for the test is defined, the context can be expanded to include parameters that will be applied to the
+traversal under test. Any variable value being used in the traversal under test, especially ones that require a
+specific type, should be defined as parameters. The structure for parameter definition looks like this:
+
+[source,gherkin]
+----
+Given the modern graph
+And using the parameter v1Id defined as "v[marko].id"
+----
+
+In the above example, "v1Id" is the name of the parameter that will be used in the traversal. The end of that line in
+quotes is the value of that parameter and should use the type system notation that has been developed for the TinkerPop
+Gherkin tests. The type system notation ensures that different language variants have the ability to construct the
+appropriate types expected by the tests.
+
+The syntax of the type notation involves a prefix character to help denote the type, a value between two square
+brackets, optionally suffixed with some additional notation depending on the primary type.
+
+* Edge - *e[_xxx_]* - The "xxx" should be replaced with a representation of an edge in the form of the
+`vertex_name-edgelabel->vertex_name`. This syntax may also include the `.id` suffix which would indicate getting the
+edge identifier or the `.sid` suffix which gets a string representation of the edge identifier.
+* Lambda - *c[_xxx_]* - The "xxx" should contain a lambda written in Groovy.
+* List - *l[_xxx_,_yyy_,_zzz_,...]* - A comma separated collection of values that make up the list should be added to
+between the square brackets. These values respect the type system thus allowing for creation of lists of vertices,
+edges, maps, and any other available type.
+* Map - *m[_xxx_]* - The "xxx" should be replaced with a JSON string. Note that keys and values will be parsed using
+the type notation system so that it is possible to have maps containing arbitrary keys and values.
+* Numeric - *d[_xxx_]._y_* - The "xxx" should be replaced with a number. The suffix denoted by "y" should always be
+included to further qualify the type of numeric. The following options are available:
+** *d* - 32-bit Double
+** *f* - 32-bit Float
+** *i* - 32-bit Integer
+** *l* - 64-bit Long
+** *m* - Arbitrary-precision signed decimal numbers (i.e. BigDecimal in Java)
+* Path - *p[_xxx_,_yyy_,_zzz_,...]* - A comma separated collection of values that make up the `Path` should be added to
+between the square brackets. These values respect the type system thus allowing for creation of `Path` of vertices,
+edges, maps, and any other available type.
+* Set - *s[_xxx_,_yyy_,_zzz_,...]* - A comma separated collection of values that make up the set should be added to
+between the square brackets. These values respect the type system thus allowing for creation of sets of vertices,
+edges, maps, and any other available type.
+* String - Any value not using the system notation will be interpreted as a string.
+* T - *t[_xxx_]* - The "xxx" should be replaced with a value of the `T` enum, such as `id` or `label`.
+* Vertex - *v[_xxx_]* - The "xxx" should be replaced with the "name" property of a vertex in the graph. This syntax may
+include the `.id` suffix which would indicate getting the vertex identifier or the `.sid` suffix which gets a string
+representation of the edge identifier.
+
+Finally, specify the traversal under test with the "Given" option "and the traversal":
+
+[source,gherkin]
+----
+And the traversal of
+  """
+  g.V(v1Id).union(__.repeat(__.out()).times(2), __.out()).values("name")
+  """
+----
+
+It will be the results of this traversal that end up being asserted by Gherkin. When writing these test traversals,
+be sure to always use the method and enum prefixes. For example, use  `__.out()` for an anonymous traversal rather
+than just `out()` and prefer `Scope.local` rather than just `local`.
+
+If a particular test cannot be written in Gherkin for some reason or cannot be otherwise supported by a GLV, first,
+consider whether or not this test can be re-written in Java so that it will work for GLVs and then, second, if it
+cannot, then use the following syntax for unsupported tests:
+
+[source,gherkin]
+----
+Scenario: g_V_outXcreatedX_groupCountXxX_capXxX
+  Given an unsupported test
+  Then nothing should happen because
+    """
+    The result returned is not supported under GraphSON 2.x and therefore cannot be properly asserted. More
+    specifically it has vertex keys which basically get toString()'d under GraphSON 2.x. This test can be supported
+    with GraphSON 3.x.
+    """
+----
+
+==== When
+
+The "When" options get the result from the traversal in preparation for assertion. There are two options to iterate:
+
+* "When iterated to list" - iterates the entire traversal into a list result that is asserted
+* "When iterated next" - gets the first value from the traversal as the result to be asserted
+
+There should be only one "When" defined in a scenario.
+
+==== Then
+
+The "Then" options handle the assertion of the result. There are several options to consider:
+
+* "the result should have a count of _xxx_" - assumes a list value in the result and counts the number of values
+in it
+* "the result should be empty" - no results
+* "the result should be ordered" - the exact results and should appear in the order presented
+* "the result should be unordered" - the exact results but can appear any order
+* "the result should be of" - results can be any of the specified values and in any order (use when guarantees
+regarding the exact results cannot be pre-determined easily - see the `range()` step tests for examples)
+
+These final three types of assertions mentioned above should be followed by a Gherkin table that has one column, where
+each row value in that column represents a value to assert in the result. These values are type notation respected as
+shown in the following example:
+
+[source,gherkin]
+----
+Then the result should be unordered
+  | result |
+  | ripple |
+  | lop |
+  | lop   |
+  | vadas |
+  | josh  |
+----
+
+Another method of assertion is to test mutations in the original graph. Again, mutations should only occur on the
+"empty" graph, but they can be validated as follows:
+
+[source,gherkin]
+----
+Scenario: g_V_outE_drop
+  Given the empty graph
+  And the graph initializer of
+    """
+    g.addV().as("a").addV().as("b").addE("knows").to("a")
+    """
+  And the traversal of
+    """
+    g.V().outE().drop()
+    """
+  When iterated to list
+  Then the result should be empty
+  And the graph should return 2 for count of "g.V()"
+  And the graph should return 0 for count of "g.E()"
+----
+
 == Developing Benchmarks
 
 Benchmarks are a useful tool to track performance between TinkerPop versions and also as tools to aid development