You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/09/30 18:17:22 UTC
[1/2] incubator-tinkerpop git commit: moved the clone() bug fixes in
RepeatStep and TraversalRing down to tp30.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 97fd47d69 -> 302a4ec0a
moved the clone() bug fixes in RepeatStep and TraversalRing down to tp30.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/675b9c4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/675b9c4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/675b9c4c
Branch: refs/heads/master
Commit: 675b9c4cdf272137aa9e4d9729632b722f8ec684
Parents: 78cfe5b
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Sep 30 10:14:48 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Sep 30 10:14:48 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../traversal/step/branch/RepeatStep.java | 35 ++++++++++++--------
.../process/traversal/util/TraversalRing.java | 6 ++--
3 files changed, 25 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/675b9c4c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ee7e7d9..3ae1142 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
TinkerPop 3.0.2 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Fixed a `clone()` bug in `RepeatStep` and `TraversalRing`.
* Fixed a thread context bug in `TinkerGraphComputer`.
* Improved session closing for transactional graphs during shutdown of Gremlin Server.
* Fixed id parameter used in tests for `GroovyStoreTest` and `GroovyRepeatTest` to not be treated as an embedded string.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/675b9c4c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
index 21d848a..518bf51 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
@@ -28,7 +28,12 @@ import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -218,7 +223,7 @@ public final class RepeatStep<S> extends ComputerAwareStep<S, S> implements Trav
///////////////////////////////////
- public class RepeatEndStep extends ComputerAwareStep<S, S> {
+ public static class RepeatEndStep<S> extends ComputerAwareStep<S, S> {
public RepeatEndStep(final Traversal.Admin traversal) {
super(traversal);
@@ -226,18 +231,19 @@ public final class RepeatStep<S> extends ComputerAwareStep<S, S> implements Trav
@Override
protected Iterator<Traverser<S>> standardAlgorithm() throws NoSuchElementException {
+ final RepeatStep<S> repeatStep = (RepeatStep<S>) this.getTraversal().getParent();
while (true) {
final Traverser.Admin<S> start = this.starts.next();
start.incrLoops(this.getId());
- if (doUntil(start, false)) {
+ if (repeatStep.doUntil(start, false)) {
start.resetLoops();
return IteratorUtils.of(start);
} else {
- if (!RepeatStep.this.untilFirst && !RepeatStep.this.emitFirst)
- RepeatStep.this.repeatTraversal.addStart(start);
+ if (!repeatStep.untilFirst && !repeatStep.emitFirst)
+ repeatStep.repeatTraversal.addStart(start);
else
- RepeatStep.this.addStart(start);
- if (doEmit(start, false)) {
+ repeatStep.addStart(start);
+ if (repeatStep.doEmit(start, false)) {
final Traverser.Admin<S> emitSplit = start.split();
emitSplit.resetLoops();
return IteratorUtils.of(emitSplit);
@@ -248,18 +254,19 @@ public final class RepeatStep<S> extends ComputerAwareStep<S, S> implements Trav
@Override
protected Iterator<Traverser<S>> computerAlgorithm() throws NoSuchElementException {
+ final RepeatStep<S> repeatStep = (RepeatStep<S>) this.getTraversal().getParent();
final Traverser.Admin<S> start = this.starts.next();
- start.incrLoops(RepeatStep.this.getId());
- if (doUntil(start, false)) {
+ start.incrLoops(repeatStep.getId());
+ if (repeatStep.doUntil(start, false)) {
start.resetLoops();
- start.setStepId(RepeatStep.this.getNextStep().getId());
+ start.setStepId(repeatStep.getNextStep().getId());
return IteratorUtils.of(start);
} else {
- start.setStepId(RepeatStep.this.getId());
- if (doEmit(start, false)) {
+ start.setStepId(repeatStep.getId());
+ if (repeatStep.doEmit(start, false)) {
final Traverser.Admin<S> emitSplit = start.split();
emitSplit.resetLoops();
- emitSplit.setStepId(RepeatStep.this.getNextStep().getId());
+ emitSplit.setStepId(repeatStep.getNextStep().getId());
return IteratorUtils.of(start, emitSplit);
}
return IteratorUtils.of(start);
@@ -267,4 +274,4 @@ public final class RepeatStep<S> extends ComputerAwareStep<S, S> implements Trav
}
}
-}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/675b9c4c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalRing.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalRing.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalRing.java
index 3b4c709..f1e6c87 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalRing.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalRing.java
@@ -32,8 +32,7 @@ import java.util.List;
*/
public final class TraversalRing<A, B> implements Serializable, Cloneable {
- private final IdentityTraversal<A, B> identityTraversal = new IdentityTraversal<>();
-
+ private IdentityTraversal<A, B> identityTraversal = new IdentityTraversal<>();
private List<Traversal.Admin<A, B>> traversals = new ArrayList<>();
private int currentTraversal = -1;
@@ -80,6 +79,7 @@ public final class TraversalRing<A, B> implements Serializable, Cloneable {
try {
final TraversalRing<A, B> clone = (TraversalRing<A, B>) super.clone();
clone.traversals = new ArrayList<>();
+ clone.identityTraversal = new IdentityTraversal<>();
for (final Traversal.Admin<A, B> traversal : this.traversals) {
clone.addTraversal(traversal.clone());
}
@@ -97,4 +97,4 @@ public final class TraversalRing<A, B> implements Serializable, Cloneable {
}
return result;
}
-}
+}
\ No newline at end of file
[2/2] incubator-tinkerpop git commit: merged tp30 RepeatStep fix but
added back tp31 step.addLabels(). Tweaked CHANGELOG to put the clone() fixes
in tp30.
Posted by ok...@apache.org.
merged tp30 RepeatStep fix but added back tp31 step.addLabels(). Tweaked CHANGELOG to put the clone() fixes in tp30.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/302a4ec0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/302a4ec0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/302a4ec0
Branch: refs/heads/master
Commit: 302a4ec0a1b42f97f612e9f54db30ed8cbef4d14
Parents: 97fd47d 675b9c4
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Sep 30 10:17:04 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Sep 30 10:17:04 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 4 ++--
.../gremlin/process/traversal/step/branch/RepeatStep.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/302a4ec0/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 0510c74,3ae1142..de077d3
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -15,50 -15,7 +15,49 @@@ See the License for the specific langua
limitations under the License.
////
TinkerPop3 CHANGELOG
--=====================
++====================
+
+
+TinkerPop 3.1.0 (A 187 On The Undercover Gremlinz)
+--------------------------------------------------
+
+image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/static/images/gremlin-gangster.png[width=185]
+
+TinkerPop 3.1.0 (NOT OFFICIALLY RELEASED YET)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* Fixed a severe threading issue in `TinkerGraphComputer`.
- * Fixed a `clone()` bug in `RepeatStep` and `TraversalRing`.
+* `GiraphGraphComputer.workers()` is smart about using threads and machines to load balance TinkerPop workers across cluster.
+* `GraphComputer.workers(int)` allows the user to programmatically set the number of workers to spawn.
+* Added `GryoSerializer` as the new recommended Spark `Serializer`. Handles `Graph` and `GryoMapper` registries.
+* `GryoPool` now makes use of `GryoPool.Builder` for its construction.
+* Bumped to Apache Hadoop 2.7.1.
+* Bumped to Apache Giraph 1.1.0.
+* Bumped to Apache Spark 1.5.1.
+* Split Hadoop-Gremlin apart such there is now `hadoop-gremlin`, `spark-gremlin`, and `giraph-gremlin` (and respective `GremlinPlugins`).
+* Added `LambdaCollectingBarrierStep` which generalizes `NoOpBarrierStep` and allows for `barrier(normSack)`-type operations.
+* Fixed bugs in the Gremlin Server's NIO protocol both on the server and driver side.
+* Added `Path.popEquals(Pop,Object)` to check for path equality based on `Pop` (useful for `TraverserRequirement.LABELED_PATH`).
+* Added `Operator.assign` to allow setting a direct value.
+* `Operator` is now a `BinaryOperator<Object>` with appropriate typecasting for respective number operators.
+* Simplified `SackValueStep` so it now supports both `sack(function)` and sack(function).by()`. Deprecated `sack(function,string)`.
+* Added `Parameters` object to allow for the parameters of a step to be retrieved at runtime via a traversal.
+* Redesigned (though backwards compatible) `AddEdgeStep`, `AddVertexStep`, and `AddPropertyStep` (and respective `GraphTraversal` API).
+* Added `GraphTraversalSource.inject()` so users can spawn a traverser with non-graph objects.
+* `GraphStep` can now take a single argument `Collection` which is either elements or element ids (i.e. `g.V([1,2,3])` is supported now).
+* Added `LoopsStep` to make the loop counter accessible within `repeat()`, `until()` and `emit()`.
+* Gephi Plugin no longer requires manual insert of `store` steps to visualize a traversal.
+* Gephi Plugin visualizes `Path` objects.
+* Added a `TinkerIoRegistry` that registers a custom serializer for Gryo that will serialize an entire `TinkerGraph` instance.
+* Added configuration options to Gephi Plugin for setting the size of nodes visualized.
+* Replaced `DedupBijectionStrategy` with the more effective `FilterRankingStrategy`.
+* `ComputerAwareSteps` must not only handle step ids, but also step labels.
+* Renamed `B_O_P_SE_SL_Traverser` to `B_LP_O_P_SE_SL_Traverser` as it now supports `TraverserRequirement.LABELED_PATH`.
+* Added `B_LP_O_S_SE_SL_Traverser` in support of `TraverserRequirement.LABELED_PATH`.
+* Added `TraverserRequirement.LABELED_PATH` which only generates path data for steps that are labeled (greatly increases the likelihood of bulking).
+* Fixed a bug in `Path` usage that required an API update: `Path.addLabel()` is now `Path.extend(Set<String>)` and `Traverser.addLabels(Set<String>)`.
+* Made `Path` iterable, so that it can be `unfold()`'ed and used by local steps like `min(local)`, `max(local)`, etc.
+* `WhereTraversalStep` and `WherePredicateStep` are now the only "special" `Scoping` steps after `MatchStartStep` in `match()`.
TinkerPop 3.0.0 (A Gremlin Rāga in 7/16 Time)
---------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/302a4ec0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
----------------------------------------------------------------------