You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by okram <gi...@git.apache.org> on 2015/11/17 19:40:36 UTC

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-679: Debuggable Trave...

GitHub user okram opened a pull request:

    https://github.com/apache/incubator-tinkerpop/pull/145

    TINKERPOP3-679: Debuggable Traversal

    https://issues.apache.org/jira/browse/TINKERPOP3-679
    
    We now have a pretty-print `TraversalExplanation` object that can be created for any `Traversal` via `Traversal.explain()`. An example is below:
    
    ```
    gremlin> g.V().outE().identity().inV().count().is(gt(5))
    ==>6
    gremlin> g.V().outE().identity().inV().count().is(gt(5)).explain()
    ==>Traversal Explanation
    =================================================================================================================================================
    Original Traversal                 [GraphStep([],vertex), VertexStep(OUT,edge), IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(5))]
    
    ConnectiveStrategy           [D]   [GraphStep([],vertex), VertexStep(OUT,edge), IdentityStep, EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(5))]
    IdentityRemovalStrategy      [O]   [GraphStep([],vertex), VertexStep(OUT,edge), EdgeVertexStep(IN), CountGlobalStep, IsStep(gt(5))]
    IncidentToAdjacentStrategy   [O]   [GraphStep([],vertex), VertexStep(OUT,vertex), CountGlobalStep, IsStep(gt(5))]
    AdjacentToIncidentStrategy   [O]   [GraphStep([],vertex), VertexStep(OUT,edge), CountGlobalStep, IsStep(gt(5))]
    FilterRankingStrategy        [O]   [GraphStep([],vertex), VertexStep(OUT,edge), CountGlobalStep, IsStep(gt(5))]
    MatchPredicateStrategy       [O]   [GraphStep([],vertex), VertexStep(OUT,edge), CountGlobalStep, IsStep(gt(5))]
    RangeByIsCountStrategy       [O]   [GraphStep([],vertex), VertexStep(OUT,edge), RangeGlobalStep(0,6), CountGlobalStep, IsStep(gt(5))]
    TinkerGraphStepStrategy      [P]   [TinkerGraphStep([],vertex), VertexStep(OUT,edge), RangeGlobalStep(0,6), CountGlobalStep, IsStep(gt(5))]
    ProfileStrategy              [F]   [TinkerGraphStep([],vertex), VertexStep(OUT,edge), RangeGlobalStep(0,6), CountGlobalStep, IsStep(gt(5))]
    EngineDependentStrategy      [F]   [TinkerGraphStep([],vertex), VertexStep(OUT,edge), RangeGlobalStep(0,6), CountGlobalStep, IsStep(gt(5))]
    StandardVerificationStrategy [V]   [TinkerGraphStep([],vertex), VertexStep(OUT,edge), RangeGlobalStep(0,6), CountGlobalStep, IsStep(gt(5))]
    ComputerVerificationStrategy [V]   [TinkerGraphStep([],vertex), VertexStep(OUT,edge), RangeGlobalStep(0,6), CountGlobalStep, IsStep(gt(5))]
    
    Final Traversal                    [TinkerGraphStep([],vertex), VertexStep(OUT,edge), RangeGlobalStep(0,6), CountGlobalStep, IsStep(gt(5))]
    gremlin>
    ```
    
    I did a `--dryRun` on the docs and things look good. I did a `mvn clean install` and all is golden. When this is merged, I will deploy SNAPSHOT documentation and brag about it on gremlin-users@.
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP3-679

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-tinkerpop/pull/145.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #145
    
----
commit 87069b28f47a221f0d84efd675f431c144b13c32
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2015-11-17T18:34:42Z

    Fixed TINKERPOP3-679. There is now Traversal.explain() which returns a TraversalExplanation that has a pretty-print toString() as well as accessor methods for programmatic introspection. Added ExplainTest (dont want to get too crazy here or else provider strategies may cause problems). Added ExplainStep to the docs and made it so both ProfileStep and ExplainStep sections reference each other. Fixed a minor bug in IncidentToAdacentStrategy and AdjacentToIndicentStrategy which was relaized when playing around with explain(). Tada.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-679: Debuggable Trave...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-tinkerpop/pull/145


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-679: Debuggable Trave...

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/145#issuecomment-157719696
  
    that's a good point - it doesn't serialize over anything including gryo.  we had to add serializers for profiling.  i think you should just open a new issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-679: Debuggable Trave...

Posted by PommeVerte <gi...@git.apache.org>.
Github user PommeVerte commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/145#issuecomment-157719245
  
    Build/tests are good. Note that this doesn't serialize over JSON. I don't think that should prevent this PR from going through so I'll +1 and open an issue in JIRA for the serialization issues later today. Shout out if you think we should go another way about this.
    
    VOTE: +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-679: Debuggable Trave...

Posted by twilmes <gi...@git.apache.org>.
Github user twilmes commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/145#issuecomment-157501940
  
    Tests all pass and I tried a variety of traversals out in the shell and explain worked as expected.  Padding between columns stays correct so formatting is good.  It can get hard to read when the traversal is long but since it returns a TraversalExplanation, a user could prettify it however they wanted quite easily (json, csv, etc.)
    
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-679: Debuggable Trave...

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/145#issuecomment-157701119
  
    Builds/tests nicely with `mvn clean install`.  Tested it out in the console with PartitionStrategy and seems to work well.
    
    +1 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-679: Debuggable Trave...

Posted by okram <gi...@git.apache.org>.
Github user okram commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/145#issuecomment-157503411
  
    Yea, we can tweak as people play with it more and come up with better representations for long traversals.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---