tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject [14/50] [abbrv] tinkerpop git commit: Fixed a bug in the CoreImports for pageRank() and peerPressure()
Date Thu, 21 Jun 2018 18:02:10 GMT
Fixed a bug in the CoreImports for pageRank() and peerPressure()

Docs weren't generating as a result of the imports. Tehcnically we needed a static class import
which CoreImports didn't support so rather than try to re-work all that, I just pulled PageRank
and PeerPressure into their own top-level classes so they would just work with what we had.
Also, lower-cased the keys as that looked more consistent with Gremlin. CTR


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

Branch: refs/heads/shortest-path-wip
Commit: f3506ee3b9bb68725367a9e6826494e33c4eb9e5
Parents: d3b6a34
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Tue Jun 12 16:36:01 2018 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Tue Jun 12 16:36:01 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc       | 16 ++++----
 docs/src/upgrade/release-3.4.x.asciidoc         |  6 +--
 .../tinkerpop/gremlin/jsr223/CoreImports.java   |  8 ++--
 .../computer/traversal/step/map/PageRank.java   | 43 ++++++++++++++++++++
 .../step/map/PageRankVertexProgramStep.java     | 41 +++++--------------
 .../traversal/step/map/PeerPressure.java        | 43 ++++++++++++++++++++
 .../step/map/PeerPressureVertexProgramStep.java | 40 +++++-------------
 .../traversal/step/map/PageRankTest.java        | 10 ++---
 .../traversal/step/map/PeerPressureTest.java    | 10 ++---
 9 files changed, 130 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 0d7d67f..0589203 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -1705,14 +1705,13 @@ g = graph.traversal().withComputer()
 g.V().pageRank().by('pageRank').values('pageRank')
 g.V().hasLabel('person').
   pageRank().
-    with(PageRank.EDGES, __.outE('knows')).
-    with(PageRank.PROPERTY_NAME, 'friendRank').
+    with(PageRank.edges, __.outE('knows')).
+    with(PageRank.propertyName, 'friendRank').
   order().by('friendRank',desc).valueMap('name','friendRank')
 ----
 
 Note the use of the `with()` modulating step which provides configuration options to the
algorithm. It takes
-configuration keys from the static `PageRank` inner class on `PageRankVertexProgramStep`
and is automatically
-imported to the Gremlin Console.
+configuration keys from the `PageRank` and is automatically imported to the Gremlin Console.
 
 The <<explain-step,`explain()`>>-step can be used to understand how the traversal
is compiled into multiple `GraphComputer` jobs.
 
@@ -1721,8 +1720,8 @@ The <<explain-step,`explain()`>>-step can be used to understand
how the traversa
 g = graph.traversal().withComputer()
 g.V().hasLabel('person').
   pageRank().
-    with(PageRank.EDGES, __.outE('knows')).
-    with(PageRank.PROPERTY_NAME, 'friendRank').
+    with(PageRank.edges, __.outE('knows')).
+    with(PageRank.propertyName, 'friendRank').
   order().by('friendRank',desc).valueMap('name','friendRank').explain()
 ----
 
@@ -1817,15 +1816,14 @@ g = graph.traversal().withComputer()
 g.V().peerPressure().by('cluster').values('cluster')
 g.V().hasLabel('person').
   peerPressure().
-    with(PeerPressure.PROPERTY_NAME, 'cluster').
+    with(PeerPressure.propertyName, 'cluster').
   group().
     by('cluster').
     by('name')
 ----
 
 Note the use of the `with()` modulating step which provides configuration options to the
algorithm. It takes
-configuration keys from the static `PeerPressure` inner class on `PeerPressureVertexProgramStep`
and is automatically
-imported to the Gremlin Console.
+configuration keys from the `PeerPressure` class and is automatically imported to the Gremlin
Console.
 
 *Additional References*
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/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
index 851d458..2568974 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -40,8 +40,8 @@ which now uses `with()` to replace the old `by()` options:
 ----
 g.V().hasLabel('person').
   pageRank().
-    with(PageRank.EDGES, __.outE('knows')).
-    with(PageRank.PROPERTY_NAME, 'friendRank').
+    with(PageRank.edges, __.outE('knows')).
+    with(PageRank.propertyName, 'friendRank').
   order().
     by('friendRank',desc).
   valueMap('name','friendRank')
@@ -53,7 +53,7 @@ A similar change was made for `peerPressure()` step:
 ----
 g.V().hasLabel('person').
   peerPressure().
-    with(PeerPressure.PROPERTY_NAME, 'cluster').
+    with(PeerPressure.propertyName, 'cluster').
   group().
     by('cluster').
     by('name')

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
index 6158285..558d6ca 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java
@@ -48,8 +48,8 @@ import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankMa
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.MemoryTraversalSideEffects;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
-import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRankVertexProgramStep;
-import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressureVertexProgramStep;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRank;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressure;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimization.GraphFilterStrategy;
 import org.apache.tinkerpop.gremlin.process.remote.RemoteConnection;
@@ -259,11 +259,11 @@ public final class CoreImports {
         CLASS_IMPORTS.add(ClusterCountMapReduce.class);
         CLASS_IMPORTS.add(ClusterPopulationMapReduce.class);
         CLASS_IMPORTS.add(MemoryTraversalSideEffects.class);
+        CLASS_IMPORTS.add(PeerPressure.class);
         CLASS_IMPORTS.add(PeerPressureVertexProgram.class);
-        CLASS_IMPORTS.add(PeerPressureVertexProgramStep.PeerPressure.class);
+        CLASS_IMPORTS.add(PageRank.class);
         CLASS_IMPORTS.add(PageRankMapReduce.class);
         CLASS_IMPORTS.add(PageRankVertexProgram.class);
-        CLASS_IMPORTS.add(PageRankVertexProgramStep.PageRank.class);
         CLASS_IMPORTS.add(GraphFilterStrategy.class);
         CLASS_IMPORTS.add(TraversalVertexProgram.class);
         CLASS_IMPORTS.add(VertexProgramStrategy.class);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRank.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRank.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRank.java
new file mode 100644
index 0000000..5f9a956
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRank.java
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.process.computer.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+
+/**
+ * Configuration options to be passed to the {@link GraphTraversal#with(String, Object)}
step on
+ * {@link GraphTraversal#pageRank()}.
+ */
+public final class PageRank {
+    /**
+     * Configures number of iterations that the algorithm should run.
+     */
+    public static final String times = Graph.Hidden.hide("tinkerpop.pageRank.times");
+
+    /**
+     * Configures the edge to traverse when calculating the pagerank.
+     */
+    public static final String edges = Graph.Hidden.hide("tinkerpop.pageRank.edges");
+
+    /**
+     * Configures the name of the property within which to store the pagerank value.
+     */
+    public static final String propertyName = Graph.Hidden.hide("tinkerpop.pageRank.propertyName");
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
index 1c5b364..277b4c6 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
@@ -23,9 +23,7 @@ import org.apache.tinkerpop.gremlin.process.computer.GraphFilter;
 import org.apache.tinkerpop.gremlin.process.computer.Memory;
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
 import org.apache.tinkerpop.gremlin.process.computer.traversal.lambda.HaltedTraversersCountTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Configuring;
-import org.apache.tinkerpop.gremlin.process.traversal.step.Parameterizing;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
@@ -60,23 +58,23 @@ public final class PageRankVertexProgramStep extends VertexProgramStep
     public PageRankVertexProgramStep(final Traversal.Admin traversal, final double alpha)
{
         super(traversal);
         this.alpha = alpha;
-        this.configure(PageRank.EDGES, __.<Vertex>outE().asAdmin());
+        this.configure(PageRank.edges, __.<Vertex>outE().asAdmin());
     }
 
     @Override
     public void configure(final Object... keyValues) {
-        if (keyValues[0].equals(PageRank.EDGES)) {
+        if (keyValues[0].equals(PageRank.edges)) {
             if (!(keyValues[1] instanceof Traversal))
-                throw new IllegalArgumentException("PageRank.EDGES requires a Traversal as
its argument");
+                throw new IllegalArgumentException("PageRank.edges requires a Traversal as
its argument");
             this.edgeTraversal = new PureTraversal<>(((Traversal<Vertex,Edge>)
keyValues[1]).asAdmin());
             this.integrateChild(this.edgeTraversal.get());
-        } else if (keyValues[0].equals(PageRank.PROPERTY_NAME)) {
+        } else if (keyValues[0].equals(PageRank.propertyName)) {
             if (!(keyValues[1] instanceof String))
-                throw new IllegalArgumentException("PageRank.PROPERTY_NAME requires a String
as its argument");
+                throw new IllegalArgumentException("PageRank.propertyName requires a String
as its argument");
             this.pageRankProperty = (String) keyValues[1];
-        } else if (keyValues[0].equals(PageRank.TIMES)) {
+        } else if (keyValues[0].equals(PageRank.times)) {
             if (!(keyValues[1] instanceof Integer))
-                throw new IllegalArgumentException("PageRank.TIMES requires an Integer as
its argument");
+                throw new IllegalArgumentException("PageRank.times requires an Integer as
its argument");
             this.times = (int) keyValues[1];
         }else {
             this.parameters.set(this, keyValues);
@@ -94,7 +92,7 @@ public final class PageRankVertexProgramStep extends VertexProgramStep
     @Deprecated
     @Override
     public void modulateBy(final Traversal.Admin<?, ?> edgeTraversal) {
-        configure(PageRank.EDGES, edgeTraversal);
+        configure(PageRank.edges, edgeTraversal);
     }
 
     /**
@@ -103,7 +101,7 @@ public final class PageRankVertexProgramStep extends VertexProgramStep
     @Deprecated
     @Override
     public void modulateBy(final String pageRankProperty) {
-        configure(PageRank.PROPERTY_NAME, pageRankProperty);
+        configure(PageRank.propertyName, pageRankProperty);
     }
 
     /**
@@ -112,7 +110,7 @@ public final class PageRankVertexProgramStep extends VertexProgramStep
     @Deprecated
     @Override
     public void modulateTimes(int times) {
-        configure(PageRank.TIMES, times);
+        configure(PageRank.times, times);
     }
 
     @Override
@@ -162,23 +160,4 @@ public final class PageRankVertexProgramStep extends VertexProgramStep
         return super.hashCode() ^ this.edgeTraversal.hashCode() ^ this.pageRankProperty.hashCode()
^ this.times;
     }
 
-    /**
-     * Configuration options to be passed to the {@link GraphTraversal#with(String, Object)}
step.
-     */
-    public static class PageRank {
-        /**
-         * Configures number of iterations that the algorithm should run.
-         */
-        public static final String TIMES = Graph.Hidden.hide("tinkerpop.pageRank.times");
-
-        /**
-         * Configures the edge to traverse when calculating the pagerank.
-         */
-        public static final String EDGES = Graph.Hidden.hide("tinkerpop.pageRank.edges");
-
-        /**
-         * Configures the name of the property within which to store the pagerank value.
-         */
-        public static final String PROPERTY_NAME = Graph.Hidden.hide("tinkerpop.pageRank.propertyName");
-    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressure.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressure.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressure.java
new file mode 100644
index 0000000..c0051f2
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressure.java
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.process.computer.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+
+/**
+ * Configuration options to be passed to the {@link GraphTraversal#with(String, Object)}
step on
+ * {@link GraphTraversal#peerPressure()}.
+ */
+public final class PeerPressure {
+    /**
+     * Configures number of iterations that the algorithm should run.
+     */
+    public static final String times = Graph.Hidden.hide("tinkerpop.peerPressure.times");
+
+    /**
+     * Configures the edge to traverse when determining clusters.
+     */
+    public static final String edges = Graph.Hidden.hide("tinkerpop.peerPressure.edges");
+
+    /**
+     * Configures the name of the property within which to store the cluster value.
+     */
+    public static final String propertyName = Graph.Hidden.hide("tinkerpop.peerPressure.propertyName");
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressureVertexProgramStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressureVertexProgramStep.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressureVertexProgramStep.java
index be65f42..e1cba60 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressureVertexProgramStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PeerPressureVertexProgramStep.java
@@ -25,7 +25,6 @@ import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.Pee
 import org.apache.tinkerpop.gremlin.process.computer.traversal.lambda.HaltedTraversersCountTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Configuring;
@@ -57,23 +56,23 @@ public final class PeerPressureVertexProgramStep extends VertexProgramStep
 
     public PeerPressureVertexProgramStep(final Traversal.Admin traversal) {
         super(traversal);
-        this.configure(PeerPressure.EDGES, __.<Vertex>outE().asAdmin());
+        this.configure(PeerPressure.edges, __.<Vertex>outE().asAdmin());
     }
 
     @Override
     public void configure(final Object... keyValues) {
-        if (keyValues[0].equals(PeerPressureVertexProgramStep.PeerPressure.EDGES)) {
+        if (keyValues[0].equals(PeerPressure.edges)) {
             if (!(keyValues[1] instanceof Traversal))
-                throw new IllegalArgumentException("PeerPressure.EDGES requires a Traversal
as its argument");
+                throw new IllegalArgumentException("PeerPressure.edges requires a Traversal
as its argument");
             this.edgeTraversal = new PureTraversal<>(((Traversal<Vertex,Edge>)
keyValues[1]).asAdmin());
             this.integrateChild(this.edgeTraversal.get());
-        } else if (keyValues[0].equals(PeerPressureVertexProgramStep.PeerPressure.PROPERTY_NAME))
{
+        } else if (keyValues[0].equals(PeerPressure.propertyName)) {
             if (!(keyValues[1] instanceof String))
-                throw new IllegalArgumentException("PeerPressure.PROPERTY_NAME requires a
String as its argument");
+                throw new IllegalArgumentException("PeerPressure.propertyName requires a
String as its argument");
             this.clusterProperty = (String) keyValues[1];
-        } else if (keyValues[0].equals(PeerPressureVertexProgramStep.PeerPressure.TIMES))
{
+        } else if (keyValues[0].equals(PeerPressure.times)) {
             if (!(keyValues[1] instanceof Integer))
-                throw new IllegalArgumentException("PeerPressure.TIMES requires an Integer
as its argument");
+                throw new IllegalArgumentException("PeerPressure.times requires an Integer
as its argument");
             this.times = (int) keyValues[1];
         }else {
             this.parameters.set(this, keyValues);
@@ -96,7 +95,7 @@ public final class PeerPressureVertexProgramStep extends VertexProgramStep
     @Deprecated
     @Override
     public void modulateBy(final Traversal.Admin<?, ?> edgeTraversal) {
-        configure(PeerPressure.EDGES, edgeTraversal);
+        configure(PeerPressure.edges, edgeTraversal);
     }
 
     /**
@@ -105,7 +104,7 @@ public final class PeerPressureVertexProgramStep extends VertexProgramStep
     @Deprecated
     @Override
     public void modulateBy(final String clusterProperty) {
-        configure(PeerPressure.PROPERTY_NAME, clusterProperty);
+        configure(PeerPressure.propertyName, clusterProperty);
     }
 
     /**
@@ -114,7 +113,7 @@ public final class PeerPressureVertexProgramStep extends VertexProgramStep
     @Deprecated
     @Override
     public void modulateTimes(int times) {
-        configure(PeerPressure.TIMES, times);
+        configure(PeerPressure.times, times);
     }
 
     @Override
@@ -158,23 +157,4 @@ public final class PeerPressureVertexProgramStep extends VertexProgramStep
         this.integrateChild(this.edgeTraversal.get());
     }
 
-    /**
-     * Configuration options to be passed to the {@link GraphTraversal#with(String, Object)}
step.
-     */
-    public static class PeerPressure {
-        /**
-         * Configures number of iterations that the algorithm should run.
-         */
-        public static final String TIMES = Graph.Hidden.hide("tinkerpop.peerPressure.times");
-
-        /**
-         * Configures the edge to traverse when determining clusters.
-         */
-        public static final String EDGES = Graph.Hidden.hide("tinkerpop.peerPressure.edges");
-
-        /**
-         * Configures the name of the property within which to store the cluster value.
-         */
-        public static final String PROPERTY_NAME = Graph.Hidden.hide("tinkerpop.peerPressure.propertyName");
-    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
index 325621e..2312967 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PageRankTest.java
@@ -23,7 +23,7 @@ import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
 import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgram;
-import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRankVertexProgramStep.PageRank;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRank;
 import org.apache.tinkerpop.gremlin.process.traversal.Order;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
@@ -64,7 +64,7 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_byXinEXcreatedXX_timesX1X_byXpriorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX();
 
-    public abstract Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXPROPERTY_NAME_pageRankXX_withXEDGES_inEXX_withXTIMES_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
+    public abstract Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankXX_withXedges_inEXX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
 
     public abstract Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_byXpageRankX_byXinEX_timesX1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
 
@@ -245,7 +245,7 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest
{
     @LoadGraphWith(MODERN)
     public void g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXPROPERTY_NAME_pageRankXX_withXEDGES_inEXX_withXTIMES_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX()
{
         // [{2.0=[v[4], v[4], v[4], v[4]], 1.0=[v[6], v[6], v[6], v[1], v[1], v[1]], software=[v[5],
v[3], v[3], v[3]]}]
-        final Traversal<Vertex, Map<Object, List<Vertex>>> traversal =
get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXPROPERTY_NAME_pageRankXX_withXEDGES_inEXX_withXTIMES_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
+        final Traversal<Vertex, Map<Object, List<Vertex>>> traversal =
get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankXX_withXedges_inEXX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX();
         printTraversalForm(traversal);
         final Map<Object, List<Vertex>> map = traversal.next();
         assertFalse(traversal.hasNext());
@@ -322,8 +322,8 @@ public abstract class PageRankTest extends AbstractGremlinProcessTest
{
         }
 
         @Override
-        public Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXPROPERTY_NAME_pageRankXX_withXEDGES_inEXX_withXTIMES_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX()
{
-            return g.V().out("created").group("m").by(T.label).pageRank(1.0).with(PageRank.PROPERTY_NAME,
"pageRank").with(PageRank.EDGES, __.inE()).with(PageRank.TIMES, 1).in("created").group("m").by("pageRank").cap("m");
+        public Traversal<Vertex, Map<Object, List<Vertex>>> get_g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankXX_withXedges_inEXX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX()
{
+            return g.V().out("created").group("m").by(T.label).pageRank(1.0).with(PageRank.propertyName,
"pageRank").with(PageRank.edges, __.inE()).with(PageRank.times, 1).in("created").group("m").by("pageRank").cap("m");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3506ee3/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
index c76941b..b70cb02 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java
@@ -23,7 +23,7 @@ import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.TestHelper;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.computer.clustering.peerpressure.PeerPressureVertexProgram;
-import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressureVertexProgramStep.PeerPressure;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressure;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -51,7 +51,7 @@ public abstract class PeerPressureTest extends AbstractGremlinProcessTest
{
 
     public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_byXoutEX_byXclusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
 
-    public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXEDGES_outEX_withXPROPERTY_NAME_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
+    public abstract Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
 
     @Test
     @LoadGraphWith(MODERN)
@@ -107,7 +107,7 @@ public abstract class PeerPressureTest extends AbstractGremlinProcessTest
{
     @LoadGraphWith(MODERN)
     public void g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXEDGES_outEX_withXPROPERTY_NAME_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX()
{
         TestHelper.assumeNonDeterministic();
-        final Traversal<Vertex, Map<String, List<Object>>> traversal =
get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXEDGES_outEX_withXPROPERTY_NAME_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
+        final Traversal<Vertex, Map<String, List<Object>>> traversal =
get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
         printTraversalForm(traversal);
         final List<Map<String, List<Object>>> results = traversal.toList();
         assertEquals(6, results.size());
@@ -143,8 +143,8 @@ public abstract class PeerPressureTest extends AbstractGremlinProcessTest
{
         }
 
         @Override
-        public Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXEDGES_outEX_withXPROPERTY_NAME_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX()
{
-            return g.V().has("name", "ripple").in("created").peerPressure().with(PeerPressure.EDGES,__.outE()).with(PeerPressure.PROPERTY_NAME,
"cluster").repeat(__.union(__.identity(), __.both())).times(2).dedup().valueMap("name", "cluster");
+        public Traversal<Vertex, Map<String, List<Object>>> get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX()
{
+            return g.V().has("name", "ripple").in("created").peerPressure().with(PeerPressure.edges,__.outE()).with(PeerPressure.propertyName,
"cluster").repeat(__.union(__.identity(), __.both())).times(2).dedup().valueMap("name", "cluster");
         }
     }
 }
\ No newline at end of file


Mime
View raw message