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/03/19 19:26:58 UTC
[40/40] incubator-tinkerpop git commit: the traversal steps provided
by TinkerPop are the foundation for all dsl. GraphTraversal is just a dsl of
traversal. Refactored the process API to reflect this concept. Fixed #592.
the traversal steps provided by TinkerPop are the foundation for all dsl. GraphTraversal is just a dsl of traversal. Refactored the process API to reflect this concept. Fixed #592.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/4c97e964
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/4c97e964
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/4c97e964
Branch: refs/heads/master
Commit: 4c97e964623ffd28b0b0e01820adfa6db501f79a
Parents: b563dc3
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Mar 19 12:26:09 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Mar 19 12:26:09 2015 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 2 +
.../console/plugin/GephiRemoteAcceptor.groovy | 2 +-
.../groovy/plugin/SugarGremlinPluginTest.java | 2 +-
.../process/FastNoSuchElementException.java | 46 -
.../apache/tinkerpop/gremlin/process/Path.java | 180 ----
.../apache/tinkerpop/gremlin/process/Scope.java | 27 -
.../apache/tinkerpop/gremlin/process/Step.java | 158 ----
.../org/apache/tinkerpop/gremlin/process/T.java | 114 ---
.../tinkerpop/gremlin/process/Traversal.java | 429 ---------
.../gremlin/process/TraversalEngine.java | 55 --
.../gremlin/process/TraversalSideEffects.java | 225 -----
.../gremlin/process/TraversalSource.java | 48 -
.../gremlin/process/TraversalStrategies.java | 195 ----
.../gremlin/process/TraversalStrategy.java | 50 -
.../tinkerpop/gremlin/process/Traverser.java | 280 ------
.../gremlin/process/TraverserGenerator.java | 48 -
.../gremlin/process/computer/MessageScope.java | 2 +-
.../peerpressure/PeerPressureVertexProgram.java | 7 +-
.../ranking/pagerank/PageRankVertexProgram.java | 4 +-
.../traversal/TraversalClassSupplier.java | 2 +-
.../traversal/TraversalScriptSupplier.java | 4 +-
.../computer/traversal/TraversalSupplier.java | 2 +-
.../traversal/TraversalVertexProgram.java | 20 +-
.../TraversalVertexProgramMessageCombiner.java | 2 +-
.../computer/traversal/TraverserExecutor.java | 10 +-
.../traversal/VertexTraversalSideEffects.java | 2 +-
.../traversal/step/map/ComputerResultStep.java | 14 +-
.../mapreduce/TraverserMapReduce.java | 8 +-
.../computer/util/VertexProgramHelper.java | 8 +-
.../graph/traversal/DefaultGraphTraversal.java | 47 -
.../process/graph/traversal/GraphTraversal.java | 847 -----------------
.../graph/traversal/GraphTraversalSource.java | 138 ---
.../gremlin/process/graph/traversal/__.java | 602 ------------
.../graph/traversal/lambda/LoopTraversal.java | 50 -
.../graph/traversal/step/ComparatorHolder.java | 33 -
.../traversal/step/HasContainerHolder.java | 33 -
.../process/graph/traversal/step/Mutating.java | 28 -
.../process/graph/traversal/step/Ranging.java | 30 -
.../graph/traversal/step/SideEffectCapable.java | 28 -
.../traversal/step/TraversalOptionParent.java | 32 -
.../graph/traversal/step/branch/BranchStep.java | 166 ----
.../graph/traversal/step/branch/ChooseStep.java | 51 -
.../graph/traversal/step/branch/LocalStep.java | 87 --
.../graph/traversal/step/branch/RepeatStep.java | 263 ------
.../graph/traversal/step/branch/UnionStep.java | 52 --
.../graph/traversal/step/filter/AndStep.java | 39 -
.../graph/traversal/step/filter/CoinStep.java | 64 --
.../traversal/step/filter/ConjunctionStep.java | 193 ----
.../traversal/step/filter/CyclicPathStep.java | 46 -
.../traversal/step/filter/DedupGlobalStep.java | 86 --
.../graph/traversal/step/filter/ExceptStep.java | 97 --
.../graph/traversal/step/filter/FilterStep.java | 47 -
.../graph/traversal/step/filter/HasStep.java | 69 --
.../traversal/step/filter/HasTraversalStep.java | 80 --
.../graph/traversal/step/filter/IsStep.java | 66 --
.../traversal/step/filter/LambdaFilterStep.java | 52 --
.../graph/traversal/step/filter/OrStep.java | 39 -
.../traversal/step/filter/RangeGlobalStep.java | 113 ---
.../graph/traversal/step/filter/RetainStep.java | 97 --
.../traversal/step/filter/SampleGlobalStep.java | 117 ---
.../traversal/step/filter/SimplePathStep.java | 47 -
.../traversal/step/filter/TimeLimitStep.java | 80 --
.../graph/traversal/step/filter/WhereStep.java | 132 ---
.../traversal/step/map/AddEdgeByPathStep.java | 95 --
.../graph/traversal/step/map/AddEdgeStep.java | 86 --
.../traversal/step/map/AddVertexStartStep.java | 53 --
.../graph/traversal/step/map/AddVertexStep.java | 49 -
.../graph/traversal/step/map/BackStep.java | 64 --
.../graph/traversal/step/map/CoalesceStep.java | 86 --
.../traversal/step/map/CountGlobalStep.java | 134 ---
.../traversal/step/map/CountLocalStep.java | 51 -
.../traversal/step/map/DedupLocalStep.java | 51 -
.../traversal/step/map/EdgeOtherVertexStep.java | 58 --
.../traversal/step/map/EdgeVertexStep.java | 67 --
.../graph/traversal/step/map/FlatMapStep.java | 60 --
.../graph/traversal/step/map/FoldStep.java | 93 --
.../traversal/step/map/GroupCountStep.java | 170 ----
.../graph/traversal/step/map/GroupStep.java | 277 ------
.../graph/traversal/step/map/IdStep.java | 47 -
.../graph/traversal/step/map/KeyStep.java | 47 -
.../graph/traversal/step/map/LabelStep.java | 47 -
.../traversal/step/map/LambdaFlatMapStep.java | 49 -
.../graph/traversal/step/map/LambdaMapStep.java | 48 -
.../graph/traversal/step/map/MapStep.java | 53 --
.../graph/traversal/step/map/MaxGlobalStep.java | 133 ---
.../graph/traversal/step/map/MaxLocalStep.java | 59 --
.../traversal/step/map/MeanGlobalStep.java | 218 -----
.../graph/traversal/step/map/MeanLocalStep.java | 59 --
.../graph/traversal/step/map/MinGlobalStep.java | 133 ---
.../graph/traversal/step/map/MinLocalStep.java | 59 --
.../traversal/step/map/OrderGlobalStep.java | 95 --
.../traversal/step/map/OrderLocalStep.java | 100 --
.../graph/traversal/step/map/PathStep.java | 95 --
.../traversal/step/map/PropertiesStep.java | 71 --
.../traversal/step/map/PropertyElementStep.java | 50 -
.../traversal/step/map/PropertyMapStep.java | 91 --
.../traversal/step/map/PropertyValueStep.java | 47 -
.../traversal/step/map/RangeLocalStep.java | 84 --
.../graph/traversal/step/map/SackStep.java | 46 -
.../traversal/step/map/SampleLocalStep.java | 112 ---
.../graph/traversal/step/map/SelectOneStep.java | 103 --
.../graph/traversal/step/map/SelectStep.java | 130 ---
.../graph/traversal/step/map/SumGlobalStep.java | 137 ---
.../graph/traversal/step/map/SumLocalStep.java | 58 --
.../graph/traversal/step/map/TreeStep.java | 178 ----
.../graph/traversal/step/map/UnfoldStep.java | 57 --
.../graph/traversal/step/map/VertexStep.java | 82 --
.../traversal/step/map/match/Bindings.java | 87 --
.../step/map/match/CrossJoinEnumerator.java | 96 --
.../traversal/step/map/match/Enumerator.java | 46 -
.../step/map/match/InnerJoinEnumerator.java | 129 ---
.../step/map/match/IteratorEnumerator.java | 67 --
.../traversal/step/map/match/MatchStep.java | 559 -----------
.../step/map/match/SerialEnumerator.java | 119 ---
.../step/map/match/SimpleEnumerator.java | 66 --
.../step/sideEffect/AddPropertyStep.java | 54 --
.../step/sideEffect/AggregateStep.java | 160 ----
.../traversal/step/sideEffect/GraphStep.java | 99 --
.../sideEffect/GroupCountSideEffectStep.java | 171 ----
.../step/sideEffect/GroupSideEffectStep.java | 248 -----
.../traversal/step/sideEffect/IdentityStep.java | 40 -
.../traversal/step/sideEffect/InjectStep.java | 50 -
.../step/sideEffect/LambdaSideEffectStep.java | 48 -
.../traversal/step/sideEffect/ProfileStep.java | 219 -----
.../step/sideEffect/SackElementValueStep.java | 66 --
.../step/sideEffect/SackObjectStep.java | 55 --
.../step/sideEffect/SideEffectCapStep.java | 80 --
.../step/sideEffect/SideEffectStep.java | 42 -
.../traversal/step/sideEffect/StartStep.java | 79 --
.../traversal/step/sideEffect/StoreStep.java | 159 ----
.../traversal/step/sideEffect/SubgraphStep.java | 122 ---
.../step/sideEffect/TreeSideEffectStep.java | 182 ----
.../step/util/CollectingBarrierStep.java | 68 --
.../traversal/step/util/ComputerAwareStep.java | 95 --
.../traversal/step/util/MarkerIdentityStep.java | 40 -
.../traversal/step/util/PathIdentityStep.java | 49 -
.../step/util/ReducingBarrierStep.java | 180 ----
.../step/util/SupplyingBarrierStep.java | 64 --
.../strategy/AbstractTraversalStrategy.java | 43 -
.../ComparatorHolderRemovalStrategy.java | 54 --
.../traversal/strategy/ConjunctionStrategy.java | 83 --
.../strategy/DedupOptimizerStrategy.java | 74 --
.../strategy/EngineDependentStrategy.java | 46 -
.../strategy/IdentityRemovalStrategy.java | 49 -
.../strategy/LabeledEndStepStrategy.java | 50 -
.../traversal/strategy/MatchWhereStrategy.java | 90 --
.../traversal/strategy/ProfileStrategy.java | 111 ---
.../strategy/RangeByIsCountStrategy.java | 90 --
.../traversal/strategy/TimeLimitedStrategy.java | 48 -
.../strategy/TraversalVerificationStrategy.java | 71 --
.../traversal/util/EmptyGraphTraversal.java | 66 --
.../process/graph/util/HasContainer.java | 113 ---
.../gremlin/process/graph/util/Tree.java | 134 ---
.../process/traversal/DefaultTraversal.java | 257 -----
.../traversal/DefaultTraversalSideEffects.java | 203 ----
.../traversal/DefaultTraversalStrategies.java | 105 ---
.../traversal/FastNoSuchElementException.java | 46 +
.../gremlin/process/traversal/Path.java | 180 ++++
.../gremlin/process/traversal/Scope.java | 27 +
.../gremlin/process/traversal/Step.java | 158 ++++
.../gremlin/process/traversal/StepPosition.java | 57 --
.../tinkerpop/gremlin/process/traversal/T.java | 114 +++
.../gremlin/process/traversal/Traversal.java | 429 +++++++++
.../process/traversal/TraversalEngine.java | 53 ++
.../process/traversal/TraversalMatrix.java | 66 --
.../process/traversal/TraversalSideEffects.java | 225 +++++
.../process/traversal/TraversalSource.java | 48 +
.../process/traversal/TraversalStrategies.java | 195 ++++
.../process/traversal/TraversalStrategy.java | 50 +
.../gremlin/process/traversal/Traverser.java | 280 ++++++
.../process/traversal/TraverserGenerator.java | 48 +
.../dsl/graph/DefaultGraphTraversal.java | 47 +
.../dsl/graph/EmptyGraphTraversal.java | 64 ++
.../traversal/dsl/graph/GraphTraversal.java | 847 +++++++++++++++++
.../dsl/graph/GraphTraversalSource.java | 138 +++
.../gremlin/process/traversal/dsl/graph/__.java | 602 ++++++++++++
.../engine/ComputerTraversalEngine.java | 7 +-
.../engine/StandardTraversalEngine.java | 4 +-
.../lambda/AbstractLambdaTraversal.java | 18 +-
.../traversal/lambda/ElementValueTraversal.java | 2 +-
.../traversal/lambda/FilterTraversal.java | 2 +-
.../lambda/FilterTraverserTraversal.java | 2 +-
.../traversal/lambda/HasNextTraversal.java | 14 +-
.../traversal/lambda/IdentityTraversal.java | 2 +-
.../process/traversal/lambda/LoopTraversal.java | 49 +
.../process/traversal/lambda/MapTraversal.java | 2 +-
.../traversal/lambda/MapTraverserTraversal.java | 2 +-
.../process/traversal/step/AbstractStep.java | 183 ----
.../traversal/step/ComparatorHolder.java | 33 +
.../step/ElementFunctionComparator.java | 57 --
.../traversal/step/ElementValueComparator.java | 56 --
.../process/traversal/step/EmptyStep.java | 142 ---
.../process/traversal/step/EngineDependent.java | 2 +-
.../traversal/step/ExpandableStepIterator.java | 77 --
.../traversal/step/HasContainerHolder.java | 33 +
.../process/traversal/step/Mutating.java | 28 +
.../gremlin/process/traversal/step/Ranging.java | 30 +
.../traversal/step/SideEffectCapable.java | 28 +
.../traversal/step/TraversalComparator.java | 57 --
.../traversal/step/TraversalOptionParent.java | 31 +
.../process/traversal/step/TraversalParent.java | 6 +-
.../traversal/step/branch/BranchStep.java | 166 ++++
.../traversal/step/branch/ChooseStep.java | 51 +
.../traversal/step/branch/LocalStep.java | 87 ++
.../traversal/step/branch/RepeatStep.java | 263 ++++++
.../traversal/step/branch/UnionStep.java | 52 ++
.../process/traversal/step/filter/AndStep.java | 39 +
.../process/traversal/step/filter/CoinStep.java | 64 ++
.../traversal/step/filter/ConjunctionStep.java | 193 ++++
.../traversal/step/filter/CyclicPathStep.java | 46 +
.../traversal/step/filter/DedupGlobalStep.java | 86 ++
.../traversal/step/filter/ExceptStep.java | 97 ++
.../traversal/step/filter/FilterStep.java | 45 +
.../process/traversal/step/filter/HasStep.java | 69 ++
.../traversal/step/filter/HasTraversalStep.java | 80 ++
.../process/traversal/step/filter/IsStep.java | 66 ++
.../traversal/step/filter/LambdaFilterStep.java | 52 ++
.../process/traversal/step/filter/OrStep.java | 39 +
.../traversal/step/filter/RangeGlobalStep.java | 113 +++
.../traversal/step/filter/RetainStep.java | 97 ++
.../traversal/step/filter/SampleGlobalStep.java | 117 +++
.../traversal/step/filter/SimplePathStep.java | 47 +
.../traversal/step/filter/TimeLimitStep.java | 80 ++
.../traversal/step/filter/WhereStep.java | 132 +++
.../traversal/step/map/AddEdgeByPathStep.java | 95 ++
.../process/traversal/step/map/AddEdgeStep.java | 86 ++
.../traversal/step/map/AddVertexStartStep.java | 53 ++
.../traversal/step/map/AddVertexStep.java | 49 +
.../process/traversal/step/map/BackStep.java | 64 ++
.../traversal/step/map/CoalesceStep.java | 86 ++
.../traversal/step/map/CountGlobalStep.java | 134 +++
.../traversal/step/map/CountLocalStep.java | 51 +
.../traversal/step/map/DedupLocalStep.java | 51 +
.../traversal/step/map/EdgeOtherVertexStep.java | 58 ++
.../traversal/step/map/EdgeVertexStep.java | 67 ++
.../process/traversal/step/map/FlatMapStep.java | 59 ++
.../process/traversal/step/map/FoldStep.java | 93 ++
.../traversal/step/map/GroupCountStep.java | 170 ++++
.../process/traversal/step/map/GroupStep.java | 277 ++++++
.../process/traversal/step/map/IdStep.java | 47 +
.../process/traversal/step/map/KeyStep.java | 47 +
.../process/traversal/step/map/LabelStep.java | 47 +
.../traversal/step/map/LambdaFlatMapStep.java | 49 +
.../traversal/step/map/LambdaMapStep.java | 48 +
.../process/traversal/step/map/MapStep.java | 53 ++
.../traversal/step/map/MaxGlobalStep.java | 133 +++
.../traversal/step/map/MaxLocalStep.java | 59 ++
.../traversal/step/map/MeanGlobalStep.java | 218 +++++
.../traversal/step/map/MeanLocalStep.java | 59 ++
.../traversal/step/map/MinGlobalStep.java | 133 +++
.../traversal/step/map/MinLocalStep.java | 59 ++
.../traversal/step/map/OrderGlobalStep.java | 95 ++
.../traversal/step/map/OrderLocalStep.java | 100 ++
.../process/traversal/step/map/PathStep.java | 95 ++
.../traversal/step/map/PropertiesStep.java | 71 ++
.../traversal/step/map/PropertyElementStep.java | 50 +
.../traversal/step/map/PropertyMapStep.java | 91 ++
.../traversal/step/map/PropertyValueStep.java | 47 +
.../traversal/step/map/RangeLocalStep.java | 84 ++
.../process/traversal/step/map/SackStep.java | 46 +
.../traversal/step/map/SampleLocalStep.java | 112 +++
.../traversal/step/map/SelectOneStep.java | 103 ++
.../process/traversal/step/map/SelectStep.java | 130 +++
.../traversal/step/map/SumGlobalStep.java | 137 +++
.../traversal/step/map/SumLocalStep.java | 58 ++
.../process/traversal/step/map/TreeStep.java | 178 ++++
.../process/traversal/step/map/UnfoldStep.java | 57 ++
.../process/traversal/step/map/VertexStep.java | 82 ++
.../traversal/step/map/match/Bindings.java | 87 ++
.../step/map/match/CrossJoinEnumerator.java | 96 ++
.../traversal/step/map/match/Enumerator.java | 46 +
.../step/map/match/InnerJoinEnumerator.java | 129 +++
.../step/map/match/IteratorEnumerator.java | 67 ++
.../traversal/step/map/match/MatchStep.java | 559 +++++++++++
.../step/map/match/SerialEnumerator.java | 119 +++
.../step/map/match/SimpleEnumerator.java | 66 ++
.../step/sideEffect/AddPropertyStep.java | 54 ++
.../step/sideEffect/AggregateStep.java | 160 ++++
.../traversal/step/sideEffect/GraphStep.java | 99 ++
.../sideEffect/GroupCountSideEffectStep.java | 171 ++++
.../step/sideEffect/GroupSideEffectStep.java | 248 +++++
.../traversal/step/sideEffect/IdentityStep.java | 40 +
.../traversal/step/sideEffect/InjectStep.java | 50 +
.../step/sideEffect/LambdaSideEffectStep.java | 48 +
.../traversal/step/sideEffect/ProfileStep.java | 219 +++++
.../step/sideEffect/SackElementValueStep.java | 66 ++
.../step/sideEffect/SackObjectStep.java | 55 ++
.../step/sideEffect/SideEffectCapStep.java | 80 ++
.../step/sideEffect/SideEffectStep.java | 42 +
.../traversal/step/sideEffect/StartStep.java | 79 ++
.../traversal/step/sideEffect/StoreStep.java | 159 ++++
.../traversal/step/sideEffect/SubgraphStep.java | 122 +++
.../step/sideEffect/TreeSideEffectStep.java | 182 ++++
.../traversal/step/util/AbstractStep.java | 183 ++++
.../process/traversal/step/util/BulkSet.java | 186 ++++
.../step/util/CollectingBarrierStep.java | 67 ++
.../traversal/step/util/ComputerAwareStep.java | 94 ++
.../step/util/ElementFunctionComparator.java | 57 ++
.../step/util/ElementValueComparator.java | 56 ++
.../process/traversal/step/util/EmptyPath.java | 102 ++
.../process/traversal/step/util/EmptyStep.java | 143 +++
.../step/util/ExpandableStepIterator.java | 77 ++
.../traversal/step/util/HasContainer.java | 113 +++
.../traversal/step/util/ImmutablePath.java | 182 ++++
.../process/traversal/step/util/MapHelper.java | 48 +
.../traversal/step/util/MarkerIdentityStep.java | 39 +
.../traversal/step/util/MutablePath.java | 107 +++
.../traversal/step/util/PathIdentityStep.java | 48 +
.../step/util/ReducingBarrierStep.java | 179 ++++
.../process/traversal/step/util/SparsePath.java | 95 ++
.../step/util/SupplyingBarrierStep.java | 63 ++
.../step/util/TraversalComparator.java | 57 ++
.../process/traversal/step/util/Tree.java | 134 +++
.../strategy/AbstractTraversalStrategy.java | 43 +
.../strategy/decoration/ElementIdStrategy.java | 14 +-
.../strategy/decoration/PartitionStrategy.java | 26 +-
.../strategy/decoration/ReadOnlyStrategy.java | 6 +-
.../strategy/decoration/SubgraphStrategy.java | 26 +-
.../ComparatorHolderRemovalStrategy.java | 54 ++
.../optimization/ConjunctionStrategy.java | 83 ++
.../optimization/DedupOptimizerStrategy.java | 75 ++
.../optimization/EngineDependentStrategy.java | 46 +
.../optimization/IdentityRemovalStrategy.java | 49 +
.../optimization/LabeledEndStepStrategy.java | 50 +
.../optimization/MatchWhereStrategy.java | 90 ++
.../strategy/optimization/ProfileStrategy.java | 112 +++
.../optimization/RangeByIsCountStrategy.java | 91 ++
.../optimization/TimeLimitedStrategy.java | 49 +
.../TraversalVerificationStrategy.java | 72 ++
.../traverser/B_O_PA_S_SE_SL_Traverser.java | 86 ++
.../B_O_PA_S_SE_SL_TraverserGenerator.java | 62 ++
.../traverser/B_O_P_PA_S_SE_SL_Traverser.java | 58 ++
.../B_O_P_PA_S_SE_SL_TraverserGenerator.java | 61 ++
.../traversal/traverser/B_O_Traverser.java | 70 ++
.../traverser/B_O_TraverserGenerator.java | 55 ++
.../traversal/traverser/O_Traverser.java | 35 +
.../traverser/O_TraverserGenerator.java | 52 ++
.../traverser/TraverserGeneratorFactory.java | 33 +
.../traverser/TraverserRequirement.java | 39 +
.../traverser/util/AbstractPathTraverser.java | 213 +++++
.../traverser/util/AbstractTraverser.java | 187 ++++
.../util/DefaultTraverserGeneratorFactory.java | 64 ++
.../traverser/util/EmptyTraverser.java | 153 +++
.../traversal/traverser/util/TraverserSet.java | 143 +++
.../traversal/util/DefaultTraversal.java | 256 +++++
.../util/DefaultTraversalSideEffects.java | 202 ++++
.../util/DefaultTraversalStrategies.java | 105 +++
.../traversal/util/DependantMutableMetrics.java | 59 ++
.../process/traversal/util/EmptyTraversal.java | 20 +-
.../util/EmptyTraversalSideEffects.java | 2 +-
.../util/EmptyTraversalStrategies.java | 11 +-
.../traversal/util/ImmutableMetrics.java | 103 ++
.../gremlin/process/traversal/util/Metrics.java | 104 +++
.../process/traversal/util/MutableMetrics.java | 171 ++++
.../traversal/util/SideEffectHelper.java | 2 +-
.../util/StandardTraversalMetrics.java | 204 ++++
.../process/traversal/util/StepPosition.java | 57 ++
.../process/traversal/util/TraversalHelper.java | 17 +-
.../process/traversal/util/TraversalMatrix.java | 66 ++
.../traversal/util/TraversalMetrics.java | 77 ++
.../process/traversal/util/TraversalRing.java | 2 +-
.../process/traversal/util/TraversalUtil.java | 4 +-
.../traverser/B_O_PA_S_SE_SL_Traverser.java | 87 --
.../B_O_PA_S_SE_SL_TraverserGenerator.java | 62 --
.../traverser/B_O_P_PA_S_SE_SL_Traverser.java | 58 --
.../B_O_P_PA_S_SE_SL_TraverserGenerator.java | 61 --
.../process/traverser/B_O_Traverser.java | 70 --
.../traverser/B_O_TraverserGenerator.java | 55 --
.../gremlin/process/traverser/O_Traverser.java | 35 -
.../process/traverser/O_TraverserGenerator.java | 52 --
.../traverser/TraverserGeneratorFactory.java | 33 -
.../process/traverser/TraverserRequirement.java | 39 -
.../traverser/util/AbstractPathTraverser.java | 213 -----
.../traverser/util/AbstractTraverser.java | 187 ----
.../util/DefaultTraverserGeneratorFactory.java | 64 --
.../process/traverser/util/EmptyTraverser.java | 153 ---
.../tinkerpop/gremlin/process/util/BulkSet.java | 186 ----
.../gremlin/process/util/MapHelper.java | 48 -
.../gremlin/process/util/TraverserSet.java | 143 ---
.../util/metric/DependantMutableMetrics.java | 59 --
.../process/util/metric/ImmutableMetrics.java | 103 --
.../gremlin/process/util/metric/Metrics.java | 104 ---
.../process/util/metric/MutableMetrics.java | 171 ----
.../util/metric/StandardTraversalMetrics.java | 204 ----
.../process/util/metric/TraversalMetrics.java | 78 --
.../gremlin/process/util/path/EmptyPath.java | 102 --
.../process/util/path/ImmutablePath.java | 182 ----
.../gremlin/process/util/path/MutablePath.java | 107 ---
.../gremlin/process/util/path/SparsePath.java | 95 --
.../tinkerpop/gremlin/structure/Graph.java | 8 +-
.../gremlin/structure/io/GraphReader.java | 2 +-
.../gremlin/structure/io/GraphWriter.java | 2 +-
.../structure/io/graphml/GraphMLReader.java | 2 +-
.../structure/io/graphml/GraphMLWriter.java | 2 +-
.../structure/io/graphson/GraphSONModule.java | 6 +-
.../structure/io/graphson/GraphSONReader.java | 2 +-
.../structure/io/graphson/GraphSONWriter.java | 2 +-
.../io/graphson/LegacyGraphSONReader.java | 2 +-
.../structure/io/gryo/GraphSerializer.java | 4 +-
.../structure/io/gryo/GremlinClassResolver.java | 2 +-
.../gremlin/structure/io/gryo/GryoMapper.java | 24 +-
.../gremlin/structure/io/gryo/GryoReader.java | 2 +-
.../io/gryo/VertexByteArrayInputStream.java | 2 +-
.../structure/strategy/GraphStrategy.java | 2 +-
.../gremlin/structure/strategy/IdStrategy.java | 4 +-
.../structure/strategy/PartitionStrategy.java | 14 +-
.../structure/strategy/SequenceStrategy.java | 2 +-
.../structure/strategy/StrategyGraph.java | 1 -
.../structure/strategy/SubgraphStrategy.java | 2 +-
.../step/sideEffect/StrategyGraphStep.java | 6 +-
.../gremlin/structure/util/ElementHelper.java | 22 +-
.../gremlin/structure/util/StringFactory.java | 10 +-
.../structure/util/batch/BatchGraph.java | 4 +-
.../structure/util/detached/DetachedEdge.java | 2 +-
.../util/detached/DetachedFactory.java | 2 +-
.../structure/util/detached/DetachedPath.java | 4 +-
.../structure/util/detached/DetachedVertex.java | 4 +-
.../structure/util/empty/EmptyGraph.java | 2 -
.../gremlin/util/function/BulkSetSupplier.java | 2 +-
.../util/function/MeanNumberSupplier.java | 2 +-
.../util/function/TraversableLambda.java | 2 +-
.../gremlin/util/function/TreeSupplier.java | 2 +-
.../gremlin/util/iterator/ArrayIterator.java | 2 +-
.../gremlin/util/iterator/DoubleIterator.java | 2 +-
.../gremlin/util/iterator/EmptyIterator.java | 2 +-
.../gremlin/util/iterator/IteratorUtils.java | 2 +-
.../gremlin/util/iterator/MultiIterator.java | 2 +-
.../gremlin/util/iterator/SingleIterator.java | 2 +-
.../process/TraversalStrategiesTest.java | 7 +-
.../step/filter/ConjunctionStepTest.java | 7 +-
.../strategy/RangeByIsCountStrategyTest.java | 15 +-
.../strategy/TimeLimitedStrategyTest.java | 11 +-
.../gremlin/process/graph/util/TreeTest.java | 1 +
.../decoration/PartitionStrategyTest.java | 20 +-
.../decoration/ReadOnlyStrategyTest.java | 4 +-
.../decoration/SubgraphStrategyTest.java | 25 +-
.../gremlin/process/util/BulkSetTest.java | 1 +
.../process/util/TraversalHelperTest.java | 19 +-
.../structure/util/ElementHelperTest.java | 2 +-
.../util/iterator/ArrayIteratorTest.java | 2 +-
.../util/iterator/DoubleIteratorTest.java | 2 +-
.../util/iterator/EmptyIteratorTest.java | 2 +-
.../util/iterator/MultiIteratorTest.java | 2 +-
.../util/iterator/SingleIteratorTest.java | 2 +-
.../driver/message/ResponseStatusCode.java | 2 +-
.../ser/GryoMessageSerializerV1D0Test.java | 2 +-
.../JsonMessageSerializerGremlinV1d0Test.java | 2 +-
.../ser/JsonMessageSerializerV1d0Test.java | 2 +-
.../gremlin/process/ComputerTestHelper.groovy | 45 -
.../process/computer/ComputerTestHelper.groovy | 46 +
.../step/branch/GroovyBranchTest.groovy | 80 --
.../step/branch/GroovyChooseTest.groovy | 51 -
.../step/branch/GroovyLocalTest.groovy | 146 ---
.../step/branch/GroovyRepeatTest.groovy | 134 ---
.../step/branch/GroovyUnionTest.groovy | 111 ---
.../traversal/step/filter/GroovyAndTest.groovy | 66 --
.../traversal/step/filter/GroovyCoinTest.groovy | 60 --
.../step/filter/GroovyCyclicPathTest.groovy | 61 --
.../step/filter/GroovyDedupTest.groovy | 100 --
.../step/filter/GroovyExceptTest.groovy | 115 ---
.../step/filter/GroovyFilterTest.groovy | 179 ----
.../step/filter/GroovyHasNotTest.groovy | 68 --
.../traversal/step/filter/GroovyHasTest.groovy | 191 ----
.../traversal/step/filter/GroovyIsTest.groovy | 91 --
.../traversal/step/filter/GroovyOrTest.groovy | 66 --
.../step/filter/GroovyRangeTest.groovy | 198 ----
.../step/filter/GroovyRetainTest.groovy | 68 --
.../step/filter/GroovySampleTest.groovy | 115 ---
.../step/filter/GroovySimplePathTest.groovy | 62 --
.../step/filter/GroovyWhereTest.groovy | 98 --
.../traversal/step/map/GroovyAddEdgeTest.groovy | 51 -
.../step/map/GroovyAddVertexTest.groovy | 46 -
.../traversal/step/map/GroovyBackTest.groovy | 147 ---
.../step/map/GroovyCoalesceTest.groovy | 104 ---
.../traversal/step/map/GroovyCountTest.groovy | 119 ---
.../traversal/step/map/GroovyFoldTest.groovy | 79 --
.../traversal/step/map/GroovyMapTest.groovy | 129 ---
.../traversal/step/map/GroovyMatchTest.groovy | 187 ----
.../traversal/step/map/GroovyMaxTest.groovy | 74 --
.../traversal/step/map/GroovyMeanTest.groovy | 63 --
.../traversal/step/map/GroovyMinTest.groovy | 74 --
.../traversal/step/map/GroovyOrderTest.groovy | 184 ----
.../traversal/step/map/GroovyPathTest.groovy | 115 ---
.../step/map/GroovyPropertiesTest.groovy | 61 --
.../traversal/step/map/GroovySelectTest.groovy | 208 -----
.../traversal/step/map/GroovySumTest.groovy | 63 --
.../traversal/step/map/GroovyUnfoldTest.groovy | 63 --
.../step/map/GroovyValueMapTest.groovy | 68 --
.../traversal/step/map/GroovyVertexTest.groovy | 294 ------
.../step/sideEffect/GroovyAggregateTest.groovy | 71 --
.../step/sideEffect/GroovyGroupCountTest.groovy | 126 ---
.../step/sideEffect/GroovyGroupTest.groovy | 97 --
.../step/sideEffect/GroovyInjectTest.groovy | 74 --
.../step/sideEffect/GroovyProfileTest.groovy | 95 --
.../step/sideEffect/GroovySackTest.groovy | 72 --
.../sideEffect/GroovySideEffectCapTest.groovy | 65 --
.../step/sideEffect/GroovySideEffectTest.groovy | 57 --
.../step/sideEffect/GroovyStoreTest.groovy | 84 --
.../step/sideEffect/GroovySubgraphTest.groovy | 49 -
.../step/sideEffect/GroovyTreeTest.groovy | 105 ---
.../step/branch/GroovyBranchTest.groovy | 80 ++
.../step/branch/GroovyChooseTest.groovy | 51 +
.../step/branch/GroovyLocalTest.groovy | 145 +++
.../step/branch/GroovyRepeatTest.groovy | 134 +++
.../step/branch/GroovyUnionTest.groovy | 111 +++
.../traversal/step/filter/GroovyAndTest.groovy | 65 ++
.../traversal/step/filter/GroovyCoinTest.groovy | 59 ++
.../step/filter/GroovyCyclicPathTest.groovy | 60 ++
.../step/filter/GroovyDedupTest.groovy | 105 +++
.../step/filter/GroovyExceptTest.groovy | 114 +++
.../step/filter/GroovyFilterTest.groovy | 179 ++++
.../step/filter/GroovyHasNotTest.groovy | 68 ++
.../traversal/step/filter/GroovyHasTest.groovy | 191 ++++
.../traversal/step/filter/GroovyIsTest.groovy | 90 ++
.../traversal/step/filter/GroovyOrTest.groovy | 65 ++
.../step/filter/GroovyRangeTest.groovy | 196 ++++
.../step/filter/GroovyRetainTest.groovy | 67 ++
.../step/filter/GroovySampleTest.groovy | 113 +++
.../step/filter/GroovySimplePathTest.groovy | 61 ++
.../step/filter/GroovyWhereTest.groovy | 95 ++
.../traversal/step/map/GroovyAddEdgeTest.groovy | 51 +
.../step/map/GroovyAddVertexTest.groovy | 46 +
.../traversal/step/map/GroovyBackTest.groovy | 146 +++
.../step/map/GroovyCoalesceTest.groovy | 103 ++
.../traversal/step/map/GroovyCountTest.groovy | 117 +++
.../traversal/step/map/GroovyFoldTest.groovy | 76 ++
.../traversal/step/map/GroovyMapTest.groovy | 129 +++
.../traversal/step/map/GroovyMatchTest.groovy | 186 ++++
.../traversal/step/map/GroovyMaxTest.groovy | 74 ++
.../traversal/step/map/GroovyMeanTest.groovy | 63 ++
.../traversal/step/map/GroovyMinTest.groovy | 74 ++
.../traversal/step/map/GroovyOrderTest.groovy | 188 ++++
.../traversal/step/map/GroovyPathTest.groovy | 113 +++
.../step/map/GroovyPropertiesTest.groovy | 60 ++
.../traversal/step/map/GroovySelectTest.groovy | 206 ++++
.../traversal/step/map/GroovySumTest.groovy | 63 ++
.../traversal/step/map/GroovyUnfoldTest.groovy | 63 ++
.../step/map/GroovyValueMapTest.groovy | 67 ++
.../traversal/step/map/GroovyVertexTest.groovy | 293 ++++++
.../step/sideEffect/GroovyAggregateTest.groovy | 70 ++
.../step/sideEffect/GroovyGroupCountTest.groovy | 126 +++
.../step/sideEffect/GroovyGroupTest.groovy | 101 ++
.../step/sideEffect/GroovyInjectTest.groovy | 74 ++
.../step/sideEffect/GroovyProfileTest.groovy | 93 ++
.../step/sideEffect/GroovySackTest.groovy | 72 ++
.../sideEffect/GroovySideEffectCapTest.groovy | 64 ++
.../step/sideEffect/GroovySideEffectTest.groovy | 56 ++
.../step/sideEffect/GroovyStoreTest.groovy | 83 ++
.../step/sideEffect/GroovySubgraphTest.groovy | 48 +
.../step/sideEffect/GroovyTreeTest.groovy | 109 +++
.../engine/GremlinExecutorPerformanceTest.java | 2 +-
.../GremlinGroovyScriptEngineOverGraphTest.java | 4 +-
.../process/GroovyProcessComputerSuite.java | 86 +-
.../process/GroovyProcessStandardSuite.java | 100 +-
.../gremlin/groovy/loaders/StepLoader.groovy | 2 +-
.../gremlin/groovy/loaders/SugarLoader.groovy | 10 +-
.../AbstractImportCustomizerProvider.java | 16 +-
.../server/op/AbstractEvalOpProcessor.java | 2 +-
.../server/GremlinServerIntegrateTest.java | 3 +-
.../tinkerpop/gremlin/AbstractGremlinSuite.java | 2 +-
.../tinkerpop/gremlin/AbstractGremlinTest.java | 4 +-
.../apache/tinkerpop/gremlin/GraphManager.java | 2 +-
.../apache/tinkerpop/gremlin/GraphProvider.java | 36 +-
.../process/AbstractGremlinProcessTest.java | 4 +-
.../tinkerpop/gremlin/process/IgnoreEngine.java | 2 +
.../gremlin/process/ProcessComputerSuite.java | 91 +-
.../gremlin/process/ProcessStandardSuite.java | 108 +--
.../process/TraversalPerformanceTest.java | 4 +-
.../tinkerpop/gremlin/process/UseEngine.java | 2 +
.../process/computer/GraphComputerTest.java | 4 +-
.../ranking/PageRankVertexProgramTest.java | 2 +-
.../computer/util/ComputerGraphTest.java | 2 +-
.../graph/traversal/step/branch/BranchTest.java | 82 --
.../graph/traversal/step/branch/ChooseTest.java | 75 --
.../graph/traversal/step/branch/LocalTest.java | 255 -----
.../graph/traversal/step/branch/RepeatTest.java | 272 ------
.../graph/traversal/step/branch/UnionTest.java | 195 ----
.../graph/traversal/step/filter/AndTest.java | 79 --
.../graph/traversal/step/filter/CoinTest.java | 84 --
.../traversal/step/filter/CyclicPathTest.java | 86 --
.../graph/traversal/step/filter/DedupTest.java | 146 ---
.../graph/traversal/step/filter/ExceptTest.java | 187 ----
.../graph/traversal/step/filter/FilterTest.java | 222 -----
.../graph/traversal/step/filter/HasNotTest.java | 98 --
.../graph/traversal/step/filter/HasTest.java | 325 -------
.../graph/traversal/step/filter/IsTest.java | 125 ---
.../graph/traversal/step/filter/OrTest.java | 77 --
.../graph/traversal/step/filter/RangeTest.java | 265 ------
.../graph/traversal/step/filter/RetainTest.java | 94 --
.../graph/traversal/step/filter/SampleTest.java | 148 ---
.../traversal/step/filter/SimplePathTest.java | 86 --
.../graph/traversal/step/filter/WhereTest.java | 162 ----
.../graph/traversal/step/map/AddEdgeTest.java | 130 ---
.../graph/traversal/step/map/AddVertexTest.java | 91 --
.../graph/traversal/step/map/BackTest.java | 221 -----
.../graph/traversal/step/map/CoalesceTest.java | 158 ----
.../graph/traversal/step/map/CountTest.java | 168 ----
.../graph/traversal/step/map/FoldTest.java | 109 ---
.../graph/traversal/step/map/MapTest.java | 153 ---
.../graph/traversal/step/map/MatchTest.java | 931 -------------------
.../graph/traversal/step/map/MaxTest.java | 93 --
.../graph/traversal/step/map/MeanTest.java | 88 --
.../graph/traversal/step/map/MinTest.java | 93 --
.../graph/traversal/step/map/OrderTest.java | 288 ------
.../graph/traversal/step/map/PathTest.java | 165 ----
.../traversal/step/map/PropertiesTest.java | 65 --
.../graph/traversal/step/map/SelectTest.java | 310 ------
.../graph/traversal/step/map/SumTest.java | 83 --
.../graph/traversal/step/map/UnfoldTest.java | 109 ---
.../graph/traversal/step/map/ValueMapTest.java | 145 ---
.../graph/traversal/step/map/VertexTest.java | 617 ------------
.../step/sideEffect/AggregateTest.java | 149 ---
.../step/sideEffect/GroupCountTest.java | 177 ----
.../traversal/step/sideEffect/GroupTest.java | 171 ----
.../traversal/step/sideEffect/InjectTest.java | 100 --
.../traversal/step/sideEffect/ProfileTest.java | 271 ------
.../traversal/step/sideEffect/SackTest.java | 105 ---
.../step/sideEffect/SideEffectCapTest.java | 95 --
.../step/sideEffect/SideEffectTest.java | 116 ---
.../traversal/step/sideEffect/StoreTest.java | 137 ---
.../traversal/step/sideEffect/SubgraphTest.java | 116 ---
.../traversal/step/sideEffect/TreeTest.java | 139 ---
.../step/util/TraversalSideEffectsTest.java | 58 --
.../TraversalVerificationStrategyTest.java | 131 ---
.../process/traversal/CoreTraversalTest.java | 8 +-
.../process/traversal/DefaultTraversalTest.java | 50 -
.../traversal/TraversalSideEffectsTest.java | 56 ++
.../traversal/step/branch/BranchTest.java | 82 ++
.../traversal/step/branch/ChooseTest.java | 75 ++
.../traversal/step/branch/LocalTest.java | 255 +++++
.../traversal/step/branch/RepeatTest.java | 272 ++++++
.../traversal/step/branch/UnionTest.java | 194 ++++
.../process/traversal/step/filter/AndTest.java | 79 ++
.../process/traversal/step/filter/CoinTest.java | 84 ++
.../traversal/step/filter/CyclicPathTest.java | 86 ++
.../traversal/step/filter/DedupTest.java | 146 +++
.../traversal/step/filter/ExceptTest.java | 186 ++++
.../traversal/step/filter/FilterTest.java | 221 +++++
.../traversal/step/filter/HasNotTest.java | 98 ++
.../process/traversal/step/filter/HasTest.java | 325 +++++++
.../process/traversal/step/filter/IsTest.java | 125 +++
.../process/traversal/step/filter/OrTest.java | 77 ++
.../traversal/step/filter/RangeTest.java | 265 ++++++
.../traversal/step/filter/RetainTest.java | 93 ++
.../traversal/step/filter/SampleTest.java | 147 +++
.../traversal/step/filter/SimplePathTest.java | 86 ++
.../traversal/step/filter/WhereTest.java | 161 ++++
.../process/traversal/step/map/AddEdgeTest.java | 130 +++
.../traversal/step/map/AddVertexTest.java | 91 ++
.../process/traversal/step/map/BackTest.java | 220 +++++
.../traversal/step/map/CoalesceTest.java | 158 ++++
.../process/traversal/step/map/CountTest.java | 168 ++++
.../process/traversal/step/map/FoldTest.java | 108 +++
.../process/traversal/step/map/MapTest.java | 152 +++
.../process/traversal/step/map/MatchTest.java | 931 +++++++++++++++++++
.../process/traversal/step/map/MaxTest.java | 93 ++
.../process/traversal/step/map/MeanTest.java | 88 ++
.../process/traversal/step/map/MinTest.java | 93 ++
.../process/traversal/step/map/OrderTest.java | 288 ++++++
.../process/traversal/step/map/PathTest.java | 165 ++++
.../traversal/step/map/PropertiesTest.java | 65 ++
.../process/traversal/step/map/SelectTest.java | 310 ++++++
.../process/traversal/step/map/SumTest.java | 83 ++
.../process/traversal/step/map/UnfoldTest.java | 109 +++
.../traversal/step/map/ValueMapTest.java | 144 +++
.../process/traversal/step/map/VertexTest.java | 617 ++++++++++++
.../step/sideEffect/AggregateTest.java | 149 +++
.../step/sideEffect/GroupCountTest.java | 177 ++++
.../traversal/step/sideEffect/GroupTest.java | 174 ++++
.../traversal/step/sideEffect/InjectTest.java | 100 ++
.../traversal/step/sideEffect/ProfileTest.java | 274 ++++++
.../traversal/step/sideEffect/SackTest.java | 103 ++
.../step/sideEffect/SideEffectCapTest.java | 95 ++
.../step/sideEffect/SideEffectTest.java | 116 +++
.../traversal/step/sideEffect/StoreTest.java | 137 +++
.../traversal/step/sideEffect/SubgraphTest.java | 116 +++
.../traversal/step/sideEffect/TreeTest.java | 142 +++
.../process/traversal/step/util/PathTest.java | 122 +++
.../PartitionStrategyProcessTest.java | 4 +-
.../decoration/ReadOnlyStrategyProcessTest.java | 6 +-
.../decoration/SubgraphStrategyProcessTest.java | 10 +-
.../TraversalVerificationStrategyTest.java | 129 +++
.../traversal/util/DefaultTraversalTest.java | 48 +
.../gremlin/process/util/PathTest.java | 124 ---
.../tinkerpop/gremlin/structure/BatchTest.java | 2 +-
.../gremlin/structure/FeatureSupportTest.java | 2 +-
.../tinkerpop/gremlin/structure/GraphTest.java | 2 +-
.../tinkerpop/gremlin/structure/IoTest.java | 2 +-
.../gremlin/structure/SerializationTest.java | 4 +-
.../gremlin/structure/VertexPropertyTest.java | 2 +-
.../tinkerpop/gremlin/structure/VertexTest.java | 2 +-
.../structure/strategy/IdStrategyTest.java | 2 +-
.../strategy/SequenceStrategyTest.java | 2 +-
.../structure/strategy/StrategyGraphTest.java | 2 +-
.../strategy/SubgraphStrategyTest.java | 4 +-
.../groovy/plugin/HadoopRemoteAcceptor.java | 6 +-
.../computer/example/TraversalSupplier1.java | 2 +-
.../computer/example/TraversalSupplier2.java | 2 +-
.../computer/example/TraversalSupplier3.java | 2 +-
.../computer/giraph/GiraphMessenger.java | 6 +-
.../computer/spark/SparkVertexPayload.java | 6 +-
.../gremlin/hadoop/structure/HadoopGraph.java | 28 +-
.../structure/hdfs/HadoopEdgeIterator.java | 2 +-
.../structure/hdfs/HadoopVertexIterator.java | 2 +-
.../hadoop/structure/hdfs/TextIterator.java | 2 +-
.../structure/io/ObjectWritableIterator.java | 2 +-
.../structure/io/script/ScriptRecordReader.java | 2 +-
.../giraph/HadoopGiraphGraphProvider.java | 2 +-
.../spark/HadoopSparkGraphProvider.java | 2 +-
.../step/sideEffect/Neo4jGraphStep.java | 238 -----
.../step/util/Neo4jCypherIterator.java | 66 --
.../strategy/Neo4jGraphStepStrategy.java | 69 --
.../step/sideEffect/Neo4jGraphStep.java | 238 +++++
.../step/util/Neo4jCypherIterator.java | 66 ++
.../optimization/Neo4jGraphStepStrategy.java | 68 ++
.../gremlin/neo4j/structure/Neo4jGraph.java | 16 +-
.../gremlin/neo4j/structure/Neo4jVertex.java | 2 +-
.../neo4j/structure/Neo4jVertexProperty.java | 2 +-
.../gremlin/neo4j/BaseNeo4jGraphTest.java | 2 +-
.../neo4j/process/Neo4jCypherStartTest.java | 2 +-
.../gremlin/neo4j/structure/Neo4jGraphTest.java | 6 +-
.../process/computer/TinkerGraphComputer.java | 2 +-
.../process/computer/TinkerMessenger.java | 6 +-
.../traversal/sideEffect/TinkerGraphStep.java | 117 ---
.../strategy/TinkerGraphStepStrategy.java | 74 --
.../step/sideEffect/TinkerGraphStep.java | 117 +++
.../optimization/TinkerGraphStepStrategy.java | 74 ++
.../tinkergraph/structure/TinkerEdge.java | 2 +-
.../tinkergraph/structure/TinkerFactory.java | 12 +-
.../tinkergraph/structure/TinkerGraph.java | 4 +-
.../process/TinkerGraphComputerProvider.java | 4 +-
.../tinkergraph/structure/TinkerGraphTest.java | 8 +-
732 files changed, 33648 insertions(+), 33704 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3910e7f..e9ebd66 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,8 @@ image::http://www.tinkerpop.com/docs/current/images/gremlin-hindu.png[width=225]
TinkerPop 3.0.0.M8 (Release Date: NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Refactored step API -- the TinkerPop3 steps are the foundation for any domain specific language (including graph).
+* `MapReduce` now has `workerStart(Stage)` and `workerEnd(Stage)` methods with analagous semantics to `VertexProgram`.
* Hadoop-Gremlin `ObjectWritable` now leverages Kryo for data serialization.
* `GiraphGraphComputer` supports arbitrary objects as the vertex id -- previously, only long ids were supported.
* Added `VertexProgramPool` to support thread safe pooling of vertex programs for graph computers that provide threaded workers.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
index 255a429..f065345 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
@@ -20,7 +20,7 @@ package org.apache.tinkerpop.gremlin.console.plugin
import org.apache.tinkerpop.gremlin.groovy.plugin.RemoteAcceptor
import org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException
-import org.apache.tinkerpop.gremlin.process.Traversal
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal
import org.apache.tinkerpop.gremlin.structure.Edge
import org.apache.tinkerpop.gremlin.structure.Graph
import org.apache.tinkerpop.gremlin.structure.Vertex
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/SugarGremlinPluginTest.java
----------------------------------------------------------------------
diff --git a/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/SugarGremlinPluginTest.java b/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/SugarGremlinPluginTest.java
index 68d9a15..4b18cea 100644
--- a/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/SugarGremlinPluginTest.java
+++ b/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/SugarGremlinPluginTest.java
@@ -20,7 +20,7 @@ package org.apache.tinkerpop.gremlin.console.groovy.plugin;
import org.apache.tinkerpop.gremlin.groovy.plugin.SugarGremlinPlugin;
import org.apache.tinkerpop.gremlin.groovy.util.MetaRegistryUtil;
-import org.apache.tinkerpop.gremlin.process.graph.traversal.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.codehaus.groovy.tools.shell.Groovysh;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/FastNoSuchElementException.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/FastNoSuchElementException.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/FastNoSuchElementException.java
deleted file mode 100644
index 180252e..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/FastNoSuchElementException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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;
-
-import java.util.NoSuchElementException;
-
-/**
- * Retrieve a singleton, fast {@link java.util.NoSuchElementException} without a stack trace.
- */
-public final class FastNoSuchElementException extends NoSuchElementException {
-
- private static final long serialVersionUID = 2303108654138257697L;
- private static final FastNoSuchElementException INSTANCE = new FastNoSuchElementException();
-
- private FastNoSuchElementException() {
- }
-
- /**
- * Retrieve a singleton, fast {@link NoSuchElementException} without a stack trace.
- */
- public static NoSuchElementException instance() {
- return INSTANCE;
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Path.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Path.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Path.java
deleted file mode 100644
index d109286..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Path.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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;
-
-import org.javatuples.Pair;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.function.BiConsumer;
-import java.util.function.Consumer;
-import java.util.stream.IntStream;
-import java.util.stream.Stream;
-
-/**
- * A Path denotes a particular walk through a {@link org.apache.tinkerpop.gremlin.structure.Graph} as defined by a {@link Traverser}.
- * In abstraction, any Path implementation maintains two lists: a list of sets of labels and a list of objects.
- * The list of labels are the labels of the steps traversed.
- * The list of objects are the objects traversed.
- *
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public interface Path extends Cloneable {
-
- /**
- * Get the number of step in the path.
- *
- * @return the size of the path
- */
- public default int size() {
- return this.objects().size();
- }
-
- /**
- * Add a new step to the path with an object and any number of associated labels.
- *
- * @param object the new head of the path
- * @param labels the labels at the head of the path
- * @return the extended path
- */
- public Path extend(final Object object, final String... labels);
-
- /**
- * Get the object associated with the particular label of the path.
- * If the path as multiple labels of the type, then return a {@link List} of those objects.
- *
- * @param label the label of the path
- * @param <A> the type of the object associated with the label
- * @return the object associated with the label of the path
- * @throws IllegalArgumentException if the path does not contain the label
- */
- public default <A> A get(final String label) throws IllegalArgumentException {
- final List<Object> objects = this.objects();
- final List<Set<String>> labels = this.labels();
- Object object = null;
- for (int i = 0; i < labels.size(); i++) {
- if (labels.get(i).contains(label)) {
- if (null == object) {
- object = objects.get(i);
- } else if (object instanceof List) {
- ((List) object).add(objects.get(i));
- } else {
- final List list = new ArrayList(2);
- list.add(object);
- list.add(objects.get(i));
- object = list;
- }
- }
- }
- if (null == object)
- throw Path.Exceptions.stepWithProvidedLabelDoesNotExist(label);
- return (A) object;
- }
-
- /**
- * Get the object associated with the specified index into the path.
- *
- * @param index the index of the path
- * @param <A> the type of the object associated with the index
- * @return the object associated with the index of the path
- */
- public default <A> A get(final int index) {
- return (A) this.objects().get(index);
- }
-
- /**
- * Return true if the path has the specified label, else return false.
- *
- * @param label the label to search for
- * @return true if the label exists in the path
- */
- public default boolean hasLabel(final String label) {
- return this.labels().stream().filter(labels -> labels.contains(label)).findAny().isPresent();
- }
-
- /**
- * Add label to the current head of the path.
- *
- * @param label the label to add to the head of the path
- */
- public void addLabel(final String label);
-
- /**
- * An ordered list of the objects in the path.
- *
- * @return the objects of the path
- */
- public List<Object> objects();
-
- /**
- * An ordered list of the labels associated with the path
- *
- * @return the labels of the path
- */
- public List<Set<String>> labels();
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("CloneDoesntDeclareCloneNotSupportedException")
- public Path clone();
-
- /**
- * Determines whether the path is a simple or not.
- * A simple path has no cycles and thus, no repeated objects.
- *
- * @return Whether the path is simple or not
- */
- public default boolean isSimple() {
- final List<Object> objects = this.objects();
- for (int i = 0; i < objects.size() - 1; i++) {
- for (int j = i + 1; j < objects.size(); j++) {
- if (objects.get(i).equals(objects.get(j)))
- return false;
- }
- }
- return true;
- }
-
- public default void forEach(final Consumer<Object> consumer) {
- this.objects().forEach(consumer);
- }
-
- public default void forEach(final BiConsumer<Object, Set<String>> consumer) {
- final List<Object> objects = this.objects();
- final List<Set<String>> labels = this.labels();
- for (int i = 0; i < objects.size(); i++) {
- consumer.accept(objects.get(i), labels.get(i));
- }
- }
-
- public default Stream<Pair<Object, Set<String>>> stream() {
- final List<Set<String>> labels = this.labels();
- final List<Object> objects = this.objects();
- return IntStream.range(0, this.size()).mapToObj(i -> Pair.with(objects.get(i), labels.get(i)));
- }
-
- public static class Exceptions {
-
- public static IllegalArgumentException stepWithProvidedLabelDoesNotExist(final String label) {
- return new IllegalArgumentException("The step with label " + label + " does not exist");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Scope.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Scope.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Scope.java
deleted file mode 100644
index 0603879..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Scope.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public enum Scope {
-
- global, local
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Step.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Step.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Step.java
deleted file mode 100644
index fb7fb07..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Step.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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;
-
-import org.apache.tinkerpop.gremlin.process.traverser.TraverserRequirement;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Optional;
-import java.util.Set;
-
-/**
- * A {@link Step} denotes a unit of computation within a {@link Traversal}.
- * A step takes an incoming object and yields an outgoing object.
- * Steps are chained together in a {@link Traversal} to yield a lazy function chain of computation.
- * <p/>
- * In the constructor of a Step, never store explicit sideEffect objects in {@link TraversalSideEffects}.
- * If a sideEffect needs to be registered with the {@link Traversal}, use SideEffects.registerSupplier().
- *
- * @param <S> The incoming object type of the step
- * @param <E> The outgoing object type of the step
- */
-public interface Step<S, E> extends Iterator<Traverser<E>>, Serializable, Cloneable {
-
- /**
- * Add a iterator of {@link Traverser} objects of type S to the step.
- *
- * @param starts The iterator of objects to add
- */
- public void addStarts(final Iterator<Traverser<S>> starts);
-
- /**
- * Add a single {@link Traverser} to the step.
- *
- * @param start The traverser to add
- */
- public void addStart(final Traverser<S> start);
-
- /**
- * Set the step that is previous to the current step.
- * Used for linking steps together to form a function chain.
- *
- * @param step the previous step of this step
- */
- public void setPreviousStep(final Step<?, S> step);
-
- /**
- * Get the step prior to the current step.
- *
- * @return The previous step
- */
- public Step<?, S> getPreviousStep();
-
- /**
- * Set the step that is next to the current step.
- * Used for linking steps together to form a function chain.
- *
- * @param step the next step of this step
- */
- public void setNextStep(final Step<E, ?> step);
-
- /**
- * Get the next step to the current step.
- *
- * @return The next step
- */
- public Step<E, ?> getNextStep();
-
- /**
- * Get the {@link Traversal.Admin} that this step is contained within.
- *
- * @param <A> The incoming object type of the traversal
- * @param <B> The outgoing object type of the traversal
- * @return The traversal of this step
- */
- public <A, B> Traversal.Admin<A, B> getTraversal();
-
- /**
- * Set the {@link Traversal} that this step is contained within.
- *
- * @param traversal the new traversal for this step
- */
- public void setTraversal(final Traversal.Admin<?, ?> traversal);
-
- /**
- * Reset the state of the step such that it has no incoming starts.
- * Internal states are to be reset, but any sideEffect data structures are not to be recreated.
- */
- public void reset();
-
- /**
- * Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
- * When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step when reset() is called.
- * Moreover, the previous and next steps should be set to {@link org.apache.tinkerpop.gremlin.process.traversal.step.EmptyStep}.
- *
- * @return The cloned step
- */
- @SuppressWarnings("CloneDoesntDeclareCloneNotSupportedException")
- public Step<S, E> clone();
-
- /**
- * Get the label of this step.
- * If the step is not labeled, then an {@link Optional#empty} is returned.
- *
- * @return the optional label of the step
- */
- public Optional<String> getLabel();
-
- /**
- * Set the label of this step.
- *
- * @param label the label for this step
- */
- public void setLabel(final String label);
-
- /**
- * Get the unique id of the step.
- * These ids can change when strategies are applied and anonymous traversals are embedded in the parent traversal.
- * A developer should typically not need to call this method.
- *
- * @param id the unique id of the step
- */
- public void setId(final String id);
-
- /**
- * Get the unique id of this step.
- *
- * @return the unique id of the step
- */
- public String getId();
-
- /**
- * Provide the necessary {@link org.apache.tinkerpop.gremlin.process.traverser.TraverserRequirement} that must be met by the traverser in order for the step to function properly.
- * The provided default implements returns an empty set.
- *
- * @return the set of requirements
- */
- public default Set<TraverserRequirement> getRequirements() {
- return Collections.emptySet();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/T.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/T.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/T.java
deleted file mode 100644
index 20d4f92..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/T.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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;
-
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-
-import java.util.function.Function;
-
-/**
- * A collection of (T)okens which allows for more concise Traversal definitions.
- * T implements {@link Function} can be used to map an element to its token value.
- * For example, <code>T.id.apply(element)</code>.
- *
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public enum T implements Function<Element, Object> {
- /**
- * Label (representing Element.label())
- */
- label {
- @Override
- public String getAccessor() {
- return LABEL;
- }
-
- @Override
- public String apply(final Element element) {
- return element.label();
- }
- },
- /**
- * Id (representing Element.id())
- */
- id {
- @Override
- public String getAccessor() {
- return ID;
- }
-
- @Override
- public Object apply(final Element element) {
- return element.id();
- }
- },
- /**
- * Key (representing Property.key())
- */
- key {
- @Override
- public String getAccessor() {
- return KEY;
- }
-
- @Override
- public String apply(final Element element) {
- return ((VertexProperty) element).key();
- }
- },
- /**
- * Value (representing Property.value())
- */
- value {
- @Override
- public String getAccessor() {
- return VALUE;
- }
-
- @Override
- public Object apply(final Element element) {
- return ((VertexProperty) element).value();
- }
- };
-
- private static final String LABEL = Graph.Hidden.hide("label");
- private static final String ID = Graph.Hidden.hide("id");
- private static final String KEY = Graph.Hidden.hide("key");
- private static final String VALUE = Graph.Hidden.hide("value");
-
- public abstract String getAccessor();
-
- @Override
- public abstract Object apply(final Element element);
-
- public static T fromString(final String accessor) {
- if (accessor.equals(LABEL))
- return label;
- else if (accessor.equals(ID))
- return id;
- else if (accessor.equals(KEY))
- return key;
- else if (accessor.equals(VALUE))
- return value;
- else
- throw new IllegalArgumentException("The following token string is unknown: " + accessor);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Traversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Traversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Traversal.java
deleted file mode 100644
index cfaeb61..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/Traversal.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*
- * 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;
-
-import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
-import org.apache.tinkerpop.gremlin.process.graph.traversal.GraphTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
-import org.apache.tinkerpop.gremlin.process.traversal.engine.StandardTraversalEngine;
-import org.apache.tinkerpop.gremlin.process.traversal.step.EmptyStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
-import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
-import org.apache.tinkerpop.gremlin.process.traverser.TraverserRequirement;
-import org.apache.tinkerpop.gremlin.process.util.BulkSet;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Optional;
-import java.util.Set;
-import java.util.function.Consumer;
-import java.util.stream.Collectors;
-
-/**
- * A {@link Traversal} represents a directed walk over a {@link Graph}.
- * This is the base interface for all traversal's, where each extending interface is seen as a domain specific language.
- * For example, {@link GraphTraversal} is a domain specific language for traversing a graph using "graph concepts" (e.g. vertices, edges).
- * Another example may represent the graph using "social concepts" (e.g. people, cities, artifacts).
- * A {@link Traversal} is evaluated in one of two ways: {@link StandardTraversalEngine} (OLTP) and {@link ComputerTraversalEngine} (OLAP).
- * OLTP traversals leverage an iterator and are executed within a single JVM (with data access allowed to be remote).
- * OLAP traversals leverage {@link GraphComputer} and are executed between multiple JVMs (and/or cores).
- *
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public interface Traversal<S, E> extends Iterator<E>, Serializable, Cloneable {
-
- /**
- * Used for reflection based access to the static "of" method of a Traversal.
- */
- public static final String OF = "of";
-
- /**
- * Get access to administrative methods of the traversal via its accompanying {@link Traversal.Admin}.
- *
- * @return the admin of this traversal
- */
- public default Traversal.Admin<S, E> asAdmin() {
- return (Traversal.Admin<S, E>) this;
- }
-
- /**
- * Return an {@link Optional} of the next E object in the traversal.
- * If the traversal is empty, then an {@link Optional#empty()} is returned.
- *
- * @return an optional of the next object in the traversal
- */
- public default Optional<E> tryNext() {
- return this.hasNext() ? Optional.of(this.next()) : Optional.empty();
- }
-
- /**
- * Get the next n-number of results from the traversal.
- * If the traversal has less than n-results, then only that number of results are returned.
- *
- * @param amount the number of results to get
- * @return the n-results in a {@link List}
- */
- public default List<E> next(final int amount) {
- final List<E> result = new ArrayList<>();
- int counter = 0;
- while (counter++ < amount && this.hasNext()) {
- result.add(this.next());
- }
- return result;
- }
-
- /**
- * Put all the results into an {@link ArrayList}.
- *
- * @return the results in a list
- */
- public default List<E> toList() {
- return this.fill(new ArrayList<>());
- }
-
- /**
- * Put all the results into a {@link HashSet}.
- *
- * @return the results in a set
- */
- public default Set<E> toSet() {
- return this.fill(new HashSet<>());
- }
-
- /**
- * Put all the results into a {@link BulkSet}.
- * This can reduce both time and space when aggregating results by ensuring a weighted set.
- *
- * @return the results in a bulk set
- */
- public default BulkSet<E> toBulkSet() {
- return this.fill(new BulkSet<>());
- }
-
- /**
- * Add all the results of the traversal to the provided collection.
- *
- * @param collection the collection to fill
- * @return the collection now filled
- */
- public default <C extends Collection<E>> C fill(final C collection) {
- try {
- if (!this.asAdmin().isLocked()) this.asAdmin().applyStrategies();
- // use the end step so the results are bulked
- final Step<?, E> endStep = this.asAdmin().getEndStep();
- while (true) {
- final Traverser<E> traverser = endStep.next();
- TraversalHelper.addToCollection(collection, traverser.get(), traverser.bulk());
- }
- } catch (final NoSuchElementException ignored) {
- }
- return collection;
- }
-
- /**
- * Iterate all the {@link Traverser} instances in the traversal.
- * What is returned is the empty traversal.
- * It is assumed that what is desired from the computation is are the sideEffects yielded by the traversal.
- *
- * @return the fully drained traversal
- */
- public default <A, B> Traversal<A, B> iterate() {
- try {
- if (!this.asAdmin().isLocked()) this.asAdmin().applyStrategies();
- // use the end step so the results are bulked
- final Step<?, E> endStep = this.asAdmin().getEndStep();
- while (true) {
- endStep.next();
- }
- } catch (final NoSuchElementException ignored) {
- }
- return (Traversal<A, B>) this;
- }
-
- /**
- * A traversal can be rewritten such that its defined end type E may yield objects of a different type.
- * This helper method allows for the casting of the output to the known the type.
- *
- * @param endType the true output type of the traversal
- * @param consumer a {@link Consumer} to process each output
- * @param <E2> the known output type of the traversal
- */
- public default <E2> void forEachRemaining(final Class<E2> endType, final Consumer<E2> consumer) {
- try {
- while (true) {
- consumer.accept((E2) next());
- }
- } catch (final NoSuchElementException ignore) {
-
- }
- }
-
- @Override
- public default void forEachRemaining(final Consumer<? super E> action) {
- try {
- while (true) {
- action.accept(next());
- }
- } catch (final NoSuchElementException ignore) {
-
- }
- }
-
- /**
- * A collection of {@link Exception} types associated with Traversal execution.
- */
- public static class Exceptions {
-
- public static IllegalStateException traversalIsLocked() {
- return new IllegalStateException("The traversal strategies are complete and the traversal can no longer be modulated");
- }
-
- public static IllegalStateException traversalIsNotReversible() {
- return new IllegalStateException("The traversal is not reversible as it contains steps that are not reversible");
- }
- }
-
- public interface Admin<S, E> extends Traversal<S, E> {
-
- /**
- * Add an iterator of {@link Traverser} objects to the head/start of the traversal.
- * Users should typically not need to call this method. For dynamic inject of data, they should use {@link org.apache.tinkerpop.gremlin.process.graph.traversal.step.sideEffect.InjectStep}.
- *
- * @param starts an iterators of traversers
- */
- public default void addStarts(final Iterator<Traverser<S>> starts) {
- if (!this.isLocked()) this.applyStrategies();
- this.getStartStep().addStarts(starts);
- }
-
- /**
- * Add a single {@link Traverser} object to the head of the traversal.
- * Users should typically not need to call this method. For dynamic inject of data, they should use {@link org.apache.tinkerpop.gremlin.process.graph.traversal.step.sideEffect.InjectStep}.
- *
- * @param start a traverser to add to the traversal
- */
- public default void addStart(final Traverser<S> start) {
- if (!this.isLocked()) this.applyStrategies();
- this.getStartStep().addStart(start);
- }
-
- /**
- * Get the {@link Step} instances associated with this traversal.
- * The steps are ordered according to their linked list structure as defined by {@link Step#getPreviousStep()} and {@link Step#getNextStep()}.
- *
- * @return the ordered steps of the traversal
- */
- public List<Step> getSteps();
-
- /**
- * Add a {@link Step} to the end of the traversal. This method should link the step to its next and previous step accordingly.
- *
- * @param step the step to add
- * @param <E2> the output of the step
- * @return the updated traversal
- * @throws IllegalStateException if the {@link TraversalStrategies} have already been applied
- */
- public default <E2> Traversal.Admin<S, E2> addStep(final Step<?, E2> step) throws IllegalStateException {
- return this.addStep(this.getSteps().size(), step);
- }
-
- /**
- * Add a {@link Step} to an arbitrary point in the traversal.
- *
- * @param index the location in the traversal to insert the step
- * @param step the step to add
- * @param <S2> the new start type of the traversal (if the added step was a start step)
- * @param <E2> the new end type of the traversal (if the added step was an end step)
- * @return the newly modulated traversal
- * @throws IllegalStateException if the {@link TraversalStrategies} have already been applied
- */
- public <S2, E2> Traversal.Admin<S2, E2> addStep(final int index, final Step<?, ?> step) throws IllegalStateException;
-
- /**
- * Remove a {@link Step} from the traversal.
- *
- * @param step the step to remove
- * @param <S2> the new start type of the traversal (if the removed step was a start step)
- * @param <E2> the new end type of the traversal (if the removed step was an end step)
- * @return the newly modulated traversal
- * @throws IllegalStateException if the {@link TraversalStrategies} have already been applied
- */
- public default <S2, E2> Traversal.Admin<S2, E2> removeStep(final Step<?, ?> step) throws IllegalStateException {
- return this.removeStep(this.getSteps().indexOf(step));
- }
-
- /**
- * Remove a {@link Step} from the traversal.
- *
- * @param index the location in the traversal of the step to be evicted
- * @param <S2> the new start type of the traversal (if the removed step was a start step)
- * @param <E2> the new end type of the traversal (if the removed step was an end step)
- * @return the newly modulated traversal
- * @throws IllegalStateException if the {@link TraversalStrategies} have already been applied
- */
- public <S2, E2> Traversal.Admin<S2, E2> removeStep(final int index) throws IllegalStateException;
-
- /**
- * Get the start/head of the traversal. If the traversal is empty, then an {@link EmptyStep} instance is returned.
- *
- * @return the start step of the traversal
- */
- public default Step<S, ?> getStartStep() {
- final List<Step> steps = this.getSteps();
- return steps.isEmpty() ? EmptyStep.instance() : steps.get(0);
- }
-
- /**
- * Get the end/tail of the traversal. If the traversal is empty, then an {@link EmptyStep} instance is returned.
- *
- * @return the end step of the traversal
- */
- public default Step<?, E> getEndStep() {
- final List<Step> steps = this.getSteps();
- return steps.isEmpty() ? EmptyStep.instance() : steps.get(steps.size() - 1);
- }
-
- /**
- * Apply the registered {@link TraversalStrategies} to the traversal.
- * Once the strategies are applied, the traversal is "locked" and can no longer have steps added to it.
- * The order of operations for strategy applications should be: globally id steps, apply strategies to root traversal, then to nested traversals.
- *
- * @throws IllegalStateException if the {@link TraversalStrategies} have already been applied
- */
- public void applyStrategies() throws IllegalStateException;
-
- /**
- * Get the {@link TraversalEngine} that will be used to execute this traversal.
- *
- * @return get the traversal engine associated with this traversal.
- */
- public TraversalEngine getEngine();
-
- /**
- * Set the {@link TraversalEngine} to be used for executing this traversal.
- *
- * @param engine the engine to execute the traversal with.
- */
- public void setEngine(final TraversalEngine engine);
-
- /**
- * Get the {@link TraverserGenerator} associated with this traversal.
- * The traversal generator creates {@link Traverser} instances that are respective of the traversal's {@link org.apache.tinkerpop.gremlin.process.traverser.TraverserRequirement}.
- *
- * @return the generator of traversers
- */
- public default TraverserGenerator getTraverserGenerator() {
- return this.getStrategies().getTraverserGeneratorFactory().getTraverserGenerator(this);
- }
-
- /**
- * Get the set of all {@link TraverserRequirement}s for this traversal.
- *
- * @return the features of a traverser that are required to execute properly in this traversal
- */
- public default Set<TraverserRequirement> getTraverserRequirements() {
- final Set<TraverserRequirement> requirements = this.getSteps().stream()
- .flatMap(step -> ((Step<?, ?>) step).getRequirements().stream())
- .collect(Collectors.toSet());
- if (this.getSideEffects().keys().size() > 0)
- requirements.add(TraverserRequirement.SIDE_EFFECTS);
- if (this.getSideEffects().getSackInitialValue().isPresent())
- requirements.add(TraverserRequirement.SACK);
- if (this.getEngine().isComputer())
- requirements.add(TraverserRequirement.BULK);
- return requirements;
- }
-
- /**
- * Call the {@link Step#reset} method on every step in the traversal.
- */
- public default void reset() {
- this.getSteps().forEach(Step::reset);
- }
-
- /**
- * Set the {@link TraversalSideEffects} of this traversal.
- *
- * @param sideEffects the sideEffects to set for this traversal.
- */
- public void setSideEffects(final TraversalSideEffects sideEffects);
-
- /**
- * Get the {@link TraversalSideEffects} associated with the traversal.
- *
- * @return The traversal sideEffects
- */
- public TraversalSideEffects getSideEffects();
-
- /**
- * Set the {@link TraversalStrategies} to be used by this traversal at evaluation time.
- *
- * @param strategies the strategies to use on this traversal
- */
- public void setStrategies(final TraversalStrategies strategies);
-
- /**
- * Get the {@link TraversalStrategies} associated with this traversal.
- *
- * @return the strategies associated with this traversal
- */
- public TraversalStrategies getStrategies();
-
- /**
- * Set the {@link org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent} {@link Step} that is the parent of this traversal.
- * Traversals can be nested and this is the means by which the traversal tree is connected.
- *
- * @param step the traversal holder parent step
- */
- public void setParent(final TraversalParent step);
-
- /**
- * Get the {@link org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent} {@link Step} that is the parent of this traversal.
- * Traversals can be nested and this is the means by which the traversal tree is walked.
- *
- * @return the traversal holder parent step
- */
- public TraversalParent getParent();
-
- /**
- * Cloning is used to duplicate the traversal typically in OLAP environments.
- *
- * @return The cloned traversal
- */
- @SuppressWarnings("CloneDoesntDeclareCloneNotSupportedException")
- public Traversal.Admin<S, E> clone();
-
- /**
- * When the traversal has had its {@link TraversalStrategies} applied to it, it is locked.
- *
- * @return whether the traversal is locked
- */
- public boolean isLocked();
-
- public Optional<Graph> getGraph();
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4c97e964/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalEngine.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalEngine.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalEngine.java
deleted file mode 100644
index d93c08d..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/TraversalEngine.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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;
-
-import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
-import org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
-import org.apache.tinkerpop.gremlin.process.traversal.engine.StandardTraversalEngine;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-import java.io.Serializable;
-import java.util.Optional;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public interface TraversalEngine extends Serializable {
-
- public enum Type {STANDARD, COMPUTER}
-
- public void processTraversal(final Traversal.Admin<?, ?> traversal);
-
- public Type getType();
-
- public Optional<GraphComputer> getGraphComputer();
-
- public default boolean isStandard() {
- return this.getType().equals(Type.STANDARD);
- }
-
- public default boolean isComputer() {
- return this.getType().equals(Type.COMPUTER);
- }
-
- ///////////
-
- public interface Builder extends Serializable {
- public TraversalEngine create(final Graph graph);
- }
-}