You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2015/08/27 17:08:45 UTC
[jira] [Commented] (TINKERPOP3-679) Debuggable Traversal
[ https://issues.apache.org/jira/browse/TINKERPOP3-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14716816#comment-14716816 ]
Marko A. Rodriguez commented on TINKERPOP3-679:
-----------------------------------------------
There could be {{TraversalAnalyzer}}. This could look like this:
{code}
t = () -> traversal
TraversalAnalyzer.analyze(t,MatchStepStrategy.class,IdentityRemovalStrategy.class)
{code}
This would then show you the following permutations of {{t}} given the supplied strategies you are interested in seeing how they interact.
{code}
t.toString() // without Match or IdentityStrategies
t.toString() // without MatchStrategy
t.toString() // without IdentityStrategy
t.toString() // normal (both strategies
{code}
This would allow developers to see how strategies are effecting the traversal. While this can all be done manually, a {{TraversalAnalyzer}} would make it easier.
> Debuggable Traversal
> --------------------
>
> Key: TINKERPOP3-679
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-679
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.0.0-incubating
> Reporter: stephen mallette
>
> I'd like to be able to put a {{Traversal}} into "debug mode". {{TraversalStrategy}} application is a bit too mysterious, making it hard to figure out why a {{Traversal}} is failing. In a recent debug session, the problem was only sorted out after we looked at the order in which strategies were applied and even then it was a bit tricky to really understand what was happening.
> If the {{Traversal}} were in this "debug mode" it could give us insight into that strategy application process which would mean at least the following:
> * Display the order in which strategies were applied
> * For each strategy applied, display the {{toString()}} of the {{Traversal}} at that stage.
> A developer could then logically see what's in the magic and recognize that strategy 7 is ovewriting what strategy 2 is doing or that strategy 4 is executing before strategy 3 somehow.
> Not sure what the best way is to implement this. A straightforward solution with an environment variable check and println in {{applyStrategies}} seemed too "cheap" though kinda nice because very little would change and that output would come as part of the standard {{Traversal}} execution. Other (better) ways?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)