tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject [9/9] incubator-tinkerpop git commit: updated CHANGELOG
Date Tue, 29 Mar 2016 00:25:07 GMT
updated CHANGELOG


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

Branch: refs/heads/master
Commit: d5a785603b8d9df055b747594757ea2e40c513e7
Parents: 4e7debe c305fec
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Mon Mar 28 18:24:50 2016 -0600
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Mon Mar 28 18:24:50 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   2 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |   6 +-
 .../gremlin/process/computer/GraphComputer.java |   8 +
 .../computer/traversal/TraverserExecutor.java   |   1 +
 .../process/traversal/TraversalStrategies.java  |   3 +-
 .../traversal/step/map/SelectOneStep.java       |  10 ++
 .../process/traversal/step/map/SelectStep.java  |  14 ++
 .../optimization/PathProcessorStrategy.java     | 155 +++++++++++++++++++
 .../optimization/PathProcessorStrategyTest.java |  97 ++++++++++++
 .../process/computer/GraphComputerTest.java     |  47 +++++-
 .../structure/TinkerGraphPlayTest.java          |   8 +-
 11 files changed, 345 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d5a78560/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 10084d6,f55cd30..ea0d52b
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,7 -26,6 +26,9 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.2.0 (NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
++* `TraversalStrategies.GlobalCache` supports both `Graph` and `GraphComputer` strategy registrations.
++* `select("a","b").by("name").by("age")`-style traversals now work in OLAP with new `PathProcessorStrategy`.
 +* `DedupGlobalStep` can now handle star-bound `by()`-modulators and scoped keys on `GraphComputer`.
  * Added `Computer` which is a builder for `GraphComputers` that is serializable.
  * `PersistedOutputRDD` now implements `PersistResultGraphAware` and thus, no more unneeded
warnings when using it.
  * Renamed `StandardTraversalMetrics` to `DefaultTraversalMetrics` given the `DefaultXXX`-convention
throughout. (*breaking*)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d5a78560/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
----------------------------------------------------------------------
diff --cc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
index 5c2a53c,6a0619d..603a68c
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
@@@ -18,8 -18,6 +18,7 @@@
   */
  package org.apache.tinkerpop.gremlin.process.traversal;
  
 +import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
- import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy;
  import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
  import org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ProfileStrategy;
  import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy;
@@@ -28,8 -26,8 +27,9 @@@ import org.apache.tinkerpop.gremlin.pro
  import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy;
  import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy;
  import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy;
 -import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RangeByIsCountStrategy;
+ import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy;
 +import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RangeByIsCountStrategy;
 +import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ComputerVerificationStrategy;
  import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.StandardVerificationStrategy;
  import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies;
  import org.apache.tinkerpop.gremlin.structure.Graph;
@@@ -193,46 -191,28 +193,47 @@@ public interface TraversalStrategies ex
                      IdentityRemovalStrategy.instance(),
                      MatchPredicateStrategy.instance(),
                      RangeByIsCountStrategy.instance(),
 -                    PathProcessorStrategy.instance(),
 -                    OrderLimitStrategy.instance(),
 +                    ProfileStrategy.instance(),
                      StandardVerificationStrategy.instance());
 -            //LambdaRestrictionStrategy.instance(),
 -            //LazyBarrierStrategy.instance(),
  
 -            CACHE.put(Graph.class, coreStrategies.clone());
 -            CACHE.put(EmptyGraph.class, new DefaultTraversalStrategies());
 +            GRAPH_CACHE.put(Graph.class, graphStrategies);
 +            GRAPH_CACHE.put(EmptyGraph.class, new DefaultTraversalStrategies());
 +
 +            /////////////////////
 +
 +            final TraversalStrategies graphComputerStrategies = new DefaultTraversalStrategies();
 +            graphComputerStrategies.addStrategies(
 +                    OrderLimitStrategy.instance(),
++                    PathProcessorStrategy.instance(),
 +                    ComputerVerificationStrategy.instance());
 +
 +            GRAPH_COMPUTER_CACHE.put(GraphComputer.class, graphComputerStrategies);
          }
  
 -        public static void registerStrategies(final Class<? extends Graph> graphClass,
final TraversalStrategies traversalStrategies) {
 -            CACHE.put(graphClass, traversalStrategies);
 +        public static void registerStrategies(final Class graphOrGraphComputerClass, final
TraversalStrategies traversalStrategies) {
 +            if (Graph.class.isAssignableFrom(graphOrGraphComputerClass))
 +                GRAPH_CACHE.put(graphOrGraphComputerClass, traversalStrategies);
 +            else if (GraphComputer.class.isAssignableFrom(graphOrGraphComputerClass))
 +                GRAPH_COMPUTER_CACHE.put(graphOrGraphComputerClass, traversalStrategies);
 +            else
 +                throw new IllegalArgumentException("The TraversalStrategies.GlobalCache
only supports Graph and GraphComputer strategy caching: " + graphOrGraphComputerClass.getCanonicalName());
          }
  
 -        public static TraversalStrategies getStrategies(final Class<? extends Graph>
graphClass) {
 -            final TraversalStrategies traversalStrategies = CACHE.get(graphClass);
 -            if (null == traversalStrategies) {
 -                if (EmptyGraph.class.isAssignableFrom(graphClass))
 -                    return CACHE.get(EmptyGraph.class);
 -                else return CACHE.get(Graph.class);
 +        public static TraversalStrategies getStrategies(final Class graphOrGraphComputerClass)
{
 +            if (Graph.class.isAssignableFrom(graphOrGraphComputerClass)) {
 +                final TraversalStrategies traversalStrategies = GRAPH_CACHE.get(graphOrGraphComputerClass);
 +                if (null == traversalStrategies) {
 +                    if (EmptyGraph.class.isAssignableFrom(graphOrGraphComputerClass))
 +                        return GRAPH_CACHE.get(EmptyGraph.class);
 +                    else return GRAPH_CACHE.get(Graph.class);
 +                }
 +                return traversalStrategies;
 +            } else if (GraphComputer.class.isAssignableFrom(graphOrGraphComputerClass))
{
 +                final TraversalStrategies traversalStrategies = GRAPH_COMPUTER_CACHE.get(graphOrGraphComputerClass);
 +                return null == traversalStrategies ? GRAPH_COMPUTER_CACHE.get(GraphComputer.class)
: traversalStrategies;
 +            } else {
 +                throw new IllegalArgumentException("The TraversalStrategies.GlobalCache
only supports Graph and GraphComputer strategy caching: " + graphOrGraphComputerClass.getCanonicalName());
              }
 -            return traversalStrategies;
          }
      }
  


Mime
View raw message