Re: gremlin_python GLV

2016-06-15 Thread Marko Rodriguez
Hello,

> I was reading through the gremlin_python GLV code this morning, and
> overall it looks like it should work pretty smoothly. Thanks for doing
> this Marko, really cool work! I just wanted to comment on a few things
> that popped out at me on my first reading.The major issue I see is
> that it is not currently Python 2/3 compatible. This is due to two
> things:

Cool! Thank you for taking your time to review the work.

> 1. The way iterators are implemented in Python 2/3 is different. This
> problem could be remedied by adding a method to
> ``PythonGraphTraversal``, something like:
> 
> def __next__(self):
>return self.next()
> 
> then, in the ``next`` method, changing line 113 to
> ``next(self.results)``, should take care of this problem.

Updated.

> 2. The ``GroovyTranslator`` class checks for type ``long``, this no
> longer exists in Python 3. Determining what to submit as a Long might
> require some discussion, but this could be easily fixed by adding
> something like:
> 
> import sys
> if sys.version_info.major > 2:
>long = int
> 
> to the top of the file.

Updated.

> 
> Other than this, there are some minor details that could be cleaned
> up. Particularly:
> 
> 1. Using ``isinstance`` instead of ``type`` to perform type checking.
> This will recognize subclasses and is the most Pythonic way to do
> this.

Seems isinstance() isn’t a method on primitives — only objects. Thus, the code 
got complex. Left it with type().

> 
> 2. Formatting - indents, and line spacing. Typically, Python methods
> are separated by a single line, and indents use four spaces. This is
> really just cosmetic for readability.

Uh. The problem is that the source code is auto-generated from 
GremlinPythonGenerator. If you want to tweak, please do so:


https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-variant/src/main/groovy/org/apache/tinkerpop/gremlin/python/GremlinPythonGenerator.groovy
 



> 3. CamelCase vs. underscores. I understand that to emulate Gremlin,
> the traversal methods etc. should use CamelCase. But I wonder if the
> helper classes (Translators) should use the Python convention of using
> underscores to name methods. Python class names use camel case by
> convention.


I haven’t changed it. If you feel we should, please do. And yes, I think its 
good to keep the Gremlin step names camelCase. For Gremlin-Ruby, we will do 
out_e() style.

> Finally, the implementation of the B class may need some work, but
> we'll have to play around with it a bit to figure out how the best
> approach to doing this.


Yea, thats all wrong. I overdosed on the introspection and then Kuppitz was 
like “Why not just have it as….” (something much simpler — which I forget what 
it was now).

> I'm sure there are more improvements, but I just wanted to get a
> conversation going. I would be happy to make a PR with some of these
> changes.

That’d be awesome. Its in TINKERPOP-1278 branch. In gremlin-variant/test you 
will see PythonProcessStandardTest and PythonProcessComputerTest. Those verify 
that the compilation is valid for all the standard and computer tests.

> Also, gremlinclient will soon support the RemoteConnection interface,
> I'll send out a link to the docs once I get everything up and running.

So cool. Please do review the Python RemoteConnection class as again, I just 
improv’d it.

Thanks again David,
Marko.

http://markorodriguez.com

[jira] [Commented] (TINKERPOP-1139) [Neo4JGraph] GraphTraversal with SubgraphStrategy removes addLabelStep (as("b"))

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15332272#comment-15332272
 ] 

ASF GitHub Bot commented on TINKERPOP-1139:
---

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/338
  
VOTE: +1


> [Neo4JGraph] GraphTraversal with SubgraphStrategy removes addLabelStep 
> (as("b"))
> 
>
> Key: TINKERPOP-1139
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1139
> Project: TinkerPop
>  Issue Type: Bug
>  Components: neo4j
>Affects Versions: 3.1.0-incubating
>Reporter: Martijn Maas
> Fix For: 3.1.3
>
>
> I am using the Neo4jGraph with the following SubgraphStrategy:
> {code}
> SubgraphStrategy.build().vertexCriterion(has("isLatest", true)).create();
> {code}
> I have 2 traversals. This one working works:
> {code}
> Map languageCounts =  
> searchResult.as("a").inE("isCreatedBy").outV().outE("hasWorkLanguage").inV().as("b").dedup("a",
>  "b")
>   .has("wwlanguage_name").groupCount()
> .by("wwlanguage_name").next();
> {code}
> This translates to:
> {code}
> [Neo4jGraphStep([],vertex)@[a], 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(IN,[isCreatedBy],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(OUT,[hasWorkLanguage],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(IN)@[b], TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), 
> DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
> {code}
> This one fails:
> {code}
> Map languageCounts = 
> searchResult.as("a").in("isCreatedBy").out("hasWorkLanguage").as("b")
>.dedup("a", 
> "b").has("wwlanguage_name")
>   .groupCount().by("wwlanguage_name").next();
> {code}
> This translates to:
> {code}
> [Neo4jGraphStep([],vertex)@[a], 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(IN,[isCreatedBy],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(OUT,[hasWorkLanguage],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), 
> DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
> {code}
> The failing query misses the '@[b]' of the last EdgeVertexStep(IN).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop issue #338: TINKERPOP-1139 Re-assigned step labels as appropriate ...

2016-06-15 Thread dkuppitz
Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/338
  
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TINKERPOP-1139) [Neo4JGraph] GraphTraversal with SubgraphStrategy removes addLabelStep (as("b"))

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15332254#comment-15332254
 ] 

ASF GitHub Bot commented on TINKERPOP-1139:
---

Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/338
  
VOTE +1.


> [Neo4JGraph] GraphTraversal with SubgraphStrategy removes addLabelStep 
> (as("b"))
> 
>
> Key: TINKERPOP-1139
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1139
> Project: TinkerPop
>  Issue Type: Bug
>  Components: neo4j
>Affects Versions: 3.1.0-incubating
>Reporter: Martijn Maas
> Fix For: 3.1.3
>
>
> I am using the Neo4jGraph with the following SubgraphStrategy:
> {code}
> SubgraphStrategy.build().vertexCriterion(has("isLatest", true)).create();
> {code}
> I have 2 traversals. This one working works:
> {code}
> Map languageCounts =  
> searchResult.as("a").inE("isCreatedBy").outV().outE("hasWorkLanguage").inV().as("b").dedup("a",
>  "b")
>   .has("wwlanguage_name").groupCount()
> .by("wwlanguage_name").next();
> {code}
> This translates to:
> {code}
> [Neo4jGraphStep([],vertex)@[a], 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(IN,[isCreatedBy],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(OUT,[hasWorkLanguage],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(IN)@[b], TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), 
> DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
> {code}
> This one fails:
> {code}
> Map languageCounts = 
> searchResult.as("a").in("isCreatedBy").out("hasWorkLanguage").as("b")
>.dedup("a", 
> "b").has("wwlanguage_name")
>   .groupCount().by("wwlanguage_name").next();
> {code}
> This translates to:
> {code}
> [Neo4jGraphStep([],vertex)@[a], 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(IN,[isCreatedBy],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(OUT,[hasWorkLanguage],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), 
> DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
> {code}
> The failing query misses the '@[b]' of the last EdgeVertexStep(IN).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop issue #338: TINKERPOP-1139 Re-assigned step labels as appropriate ...

2016-06-15 Thread okram
Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/338
  
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Closed] (TINKERPOP-1196) Calls to Result.one() might block indefinitely

2016-06-15 Thread stephen mallette (JIRA)

 [ 
https://issues.apache.org/jira/browse/TINKERPOP-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette closed TINKERPOP-1196.
---
   Resolution: Fixed
Fix Version/s: 3.2.1

This PR was merged a while ago - forgot to close the issue.

> Calls to Result.one() might block indefinitely
> --
>
> Key: TINKERPOP-1196
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1196
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.1.1-incubating
>Reporter: stephen mallette
>Assignee: stephen mallette
> Fix For: 3.1.3, 3.2.1
>
>
> There are no reproduction steps for this but it does seem to happen from on 
> very rare occasion for some unknown reason.  Need to investigate more.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TINKERPOP-1139) [Neo4JGraph] GraphTraversal with SubgraphStrategy removes addLabelStep (as("b"))

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15332245#comment-15332245
 ] 

ASF GitHub Bot commented on TINKERPOP-1139:
---

GitHub user spmallette opened a pull request:

https://github.com/apache/tinkerpop/pull/338

TINKERPOP-1139 Re-assigned step labels as appropriate in SubgraphStrategy.

https://issues.apache.org/jira/browse/TINKERPOP-1139

Step labels were not being re-written to replaced steps or to the subgraph 
filter steps and so traversals using .as('a') and the like were failing.

Runs nicely with 'mvn clean install -DincludeNeo4j`

VOTE +1

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

$ git pull https://github.com/apache/tinkerpop TINKERPOP-1139

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

https://github.com/apache/tinkerpop/pull/338.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 #338


commit a41971eca60bbafbd2e32309385a3499cd61faad
Author: Stephen Mallette 
Date:   2016-06-15T18:15:53Z

Re-assigned step labels as appropriate in SubgraphStrategy.

Step labels were not being re-written to replaced steps or to the subgraph 
filter steps and so traversals using .as('a') and the like were failing.




> [Neo4JGraph] GraphTraversal with SubgraphStrategy removes addLabelStep 
> (as("b"))
> 
>
> Key: TINKERPOP-1139
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1139
> Project: TinkerPop
>  Issue Type: Bug
>  Components: neo4j
>Affects Versions: 3.1.0-incubating
>Reporter: Martijn Maas
> Fix For: 3.1.3
>
>
> I am using the Neo4jGraph with the following SubgraphStrategy:
> {code}
> SubgraphStrategy.build().vertexCriterion(has("isLatest", true)).create();
> {code}
> I have 2 traversals. This one working works:
> {code}
> Map languageCounts =  
> searchResult.as("a").inE("isCreatedBy").outV().outE("hasWorkLanguage").inV().as("b").dedup("a",
>  "b")
>   .has("wwlanguage_name").groupCount()
> .by("wwlanguage_name").next();
> {code}
> This translates to:
> {code}
> [Neo4jGraphStep([],vertex)@[a], 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(IN,[isCreatedBy],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(OUT,[hasWorkLanguage],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(IN)@[b], TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), 
> DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
> {code}
> This one fails:
> {code}
> Map languageCounts = 
> searchResult.as("a").in("isCreatedBy").out("hasWorkLanguage").as("b")
>.dedup("a", 
> "b").has("wwlanguage_name")
>   .groupCount().by("wwlanguage_name").next();
> {code}
> This translates to:
> {code}
> [Neo4jGraphStep([],vertex)@[a], 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(IN,[isCreatedBy],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), 
> EdgeVertexStep(OUT), TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> VertexStep(OUT,[hasWorkLanguage],edge), 
> TraversalFilterStep([AndStep([[EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])], [EdgeVertexStep(OUT), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])])]])]), EdgeVertexStep(IN), 
> TraversalFilterStep([HasStep([isLatest.eq(true)])]), 
> TraversalFilterStep([PropertiesStep([wwlanguage_name],property)]), 
> DedupGlobalStep([a, b]), GroupCountStep(value(wwlanguage_name))]
> {code}
> The failing query misses 

[DISCUSS] S-Type

2016-06-15 Thread Marko Rodriguez
Hello,

I think we should introduce an S object. It would stand for Script and would 
allow you to do:

S.f(“{ it.length }”)

Where does this come in handy? Language variants.

Imagine using gremlin_python that will compile to Gremlin-Groovy for execution 
at GremlinServer.

g.V().out(“knows”)[0:2].name.map(f(“{ it.length }”))

Next, imagine you are in Gremlin-Java and want to submit a traversal to 
GremlinServer, but it has a lambda. No worries, just use the GroovyTranslator 
and you have:

g.V().out(“knows”).limit(2).values(“name”).map(f(“{ it.length }”))

We could also have:

S.s = supplier
S.c = consumer
S.f = function
S.o = operator

This gets to the general problem of being able to translate lambdas between 
different languages as well as being able to send lambdas over the wire.

Thoughts?,
Marko.

http://markorodriguez.com





[GitHub] tinkerpop issue #337: TINKERPOP-1332: Improve .explain() Dialogue

2016-06-15 Thread RussellSpitzer
Github user RussellSpitzer commented on the issue:

https://github.com/apache/tinkerpop/pull/337
  
I still think this is pretty verbose, but I'm happy with the inclusion of 
the 
```graphfilter[[VertexStep(OUT,edge)]]``` so +1 on that


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TINKERPOP-1332) Improve .explain() Dialogue

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15332039#comment-15332039
 ] 

ASF GitHub Bot commented on TINKERPOP-1332:
---

Github user RussellSpitzer commented on the issue:

https://github.com/apache/tinkerpop/pull/337
  
I still think this is pretty verbose, but I'm happy with the inclusion of 
the 
```graphfilter[[VertexStep(OUT,edge)]]``` so +1 on that


> Improve .explain() Dialogue 
> 
>
> Key: TINKERPOP-1332
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1332
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.0-incubating
>Reporter: Russell Alexander Spitzer
>Assignee: Marko A. Rodriguez
>Priority: Minor
>
> Currently the output of explain gives you a long list of strategies but no 
> details about their application
> {code}
> ==>Traversal Explanation
> 
> Original Traversal [GraphStep(vertex,[]), CountGlobalStep]
> HaltedTraverserStrategy  [D]   [GraphStep(vertex,[]), CountGlobalStep]
> ConnectiveStrategy   [D]   [GraphStep(vertex,[]), CountGlobalStep]
> VertexProgramStrategy[D]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> OrderLimitStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IdentityRemovalStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> FilterRankingStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IncidentToAdjacentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> RangeByIsCountStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> AdjacentToIncidentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> MatchPredicateStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> GraphFilterStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> PathProcessorStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkInterceptorStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkSingleIterationStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ProfileStrategy  [F]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> LambdaRestrictionStrategy[V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ComputerVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> StandardVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> Final Traversal
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> {code}
> It would be helpful if filter strategies for example would list the filters 
> used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop pull request #323: TINKERPOP-1298 Save OLAP results to file

2016-06-15 Thread dkuppitz
Github user dkuppitz closed the pull request at:

https://github.com/apache/tinkerpop/pull/323


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #323: TINKERPOP-1298 Save OLAP results to file

2016-06-15 Thread dkuppitz
Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/323
  
Closing the PR, but I'll keep the branch alive.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TINKERPOP-1298) Save OLAP results to file

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15332006#comment-15332006
 ] 

ASF GitHub Bot commented on TINKERPOP-1298:
---

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/323
  
Closing the PR, but I'll keep the branch alive.


> Save OLAP results to file
> -
>
> Key: TINKERPOP-1298
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1298
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io, process
>Reporter: Daniel Kuppitz
>Assignee: Daniel Kuppitz
>
> Provide a way to save (tabular) results to text files, just like Spark's 
> {{saveAsTextFile}}.
> I'm not sure about the best way to do it. 3 options come to my mind:
> # a new step.
> # a {{VertexProgram}}
> # a configuration option
> Things to consider / open questions:
> * Is it sufficient to simply {{toString()}} all values or should we allow 
> formatters / format stings?
> * [~jlewandowski] pointed out that it would be nice to have support for the 
> [parquet file format|https://parquet.apache.org/]. I guess now we're already 
> talking about support for different {{FileOutputFormats}} and not just 
> formatters.
> * Is that only relevant for OLAP?
> * Can we support arbitrary file systems?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TINKERPOP-1320) GremlinGroovyScriptEngineFileSandboxTest throws error: URI is not hierarchical

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331847#comment-15331847
 ] 

ASF GitHub Bot commented on TINKERPOP-1320:
---

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/336#discussion_r67174102
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoWriter.java
 ---
@@ -131,7 +131,7 @@ public void writeVertexProperty(final OutputStream 
outputStream, final VertexPro
 public void writeProperty(final OutputStream outputStream, final 
Property p) throws IOException {
 final Output output = new Output(outputStream);
 writeHeader(output);
-kryo.writeObject(output, DetachedFactory.detach(p, true));
--- End diff --

cool - something doesn't make sense in that {{GryoWriter}} - very weird 
looking.


> GremlinGroovyScriptEngineFileSandboxTest throws error: URI is not hierarchical
> --
>
> Key: TINKERPOP-1320
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1320
> Project: TinkerPop
>  Issue Type: Bug
>  Components: test-suite
>Affects Versions: 3.2.0-incubating, 3.1.2-incubating
>Reporter: Jason Plurad
>Assignee: Jason Plurad
>Priority: Minor
> Fix For: 3.1.3, 3.2.1
>
>
> This is similar to TINKERPOP-1317. The differences here are
> * The {{TestHelper.generateTempFileFromResource()}} call to load the resource 
> is happening from the {{public static void init()}} method before a graph 
> instance is available.
> * A reference to {{GremlinGroovyScriptEngineFileSandboxTest.class}} is still 
> required to located the {{sandbox.yaml}} found in the {{gremlin-test.jar}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop pull request #336: TINKERPOP-1320 fix GremlinGroovyScriptEngineFil...

2016-06-15 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/336#discussion_r67174102
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoWriter.java
 ---
@@ -131,7 +131,7 @@ public void writeVertexProperty(final OutputStream 
outputStream, final VertexPro
 public void writeProperty(final OutputStream outputStream, final 
Property p) throws IOException {
 final Output output = new Output(outputStream);
 writeHeader(output);
-kryo.writeObject(output, DetachedFactory.detach(p, true));
--- End diff --

cool - something doesn't make sense in that {{GryoWriter}} - very weird 
looking.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #335: TINKERPOP-1319: fix incorrect FeatureRequirement annot...

2016-06-15 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/335
  
VOTE +1 - pending update to upgrade docs


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TINKERPOP-1332) Improve .explain() Dialogue

2016-06-15 Thread stephen mallette (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331811#comment-15331811
 ] 

stephen mallette commented on TINKERPOP-1332:
-

I sort of agree with [~rjbriody] about pushing formatting into the output. 
Maybe we should do a {{prettyPrint()}} method on {{TraversalExplanation}} that 
does some formatting or something and leave {{toString()}} alone. In the 
console we could probably detect a {{TraversalExplanation}} being eval'd out in 
the console and then call the {{prettyPrint()}} (i think). Perhaps that would 
solve the problem?

> Improve .explain() Dialogue 
> 
>
> Key: TINKERPOP-1332
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1332
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.0-incubating
>Reporter: Russell Alexander Spitzer
>Assignee: Marko A. Rodriguez
>Priority: Minor
>
> Currently the output of explain gives you a long list of strategies but no 
> details about their application
> {code}
> ==>Traversal Explanation
> 
> Original Traversal [GraphStep(vertex,[]), CountGlobalStep]
> HaltedTraverserStrategy  [D]   [GraphStep(vertex,[]), CountGlobalStep]
> ConnectiveStrategy   [D]   [GraphStep(vertex,[]), CountGlobalStep]
> VertexProgramStrategy[D]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> OrderLimitStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IdentityRemovalStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> FilterRankingStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IncidentToAdjacentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> RangeByIsCountStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> AdjacentToIncidentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> MatchPredicateStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> GraphFilterStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> PathProcessorStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkInterceptorStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkSingleIterationStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ProfileStrategy  [F]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> LambdaRestrictionStrategy[V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ComputerVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> StandardVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> Final Traversal
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> {code}
> It would be helpful if filter strategies for example would list the filters 
> used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TINKERPOP-1332) Improve .explain() Dialogue

2016-06-15 Thread Bob Briody (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331802#comment-15331802
 ] 

Bob Briody commented on TINKERPOP-1332:
---

I don't like the idea of introducing word wrap here. That seems like something 
that should be left up to the view presenter (the terminal, another app, 
whatever). I realize that it's common to view this output in the terminal but 
1) this isn't something you can easily reverse when you don't want it and 2) It 
will only look good for the hard coded terminal size. If you do decide to keep 
it though, then width should be 80 characters. That's the standard default 
terminal character width. 

> It would be nice if this was set to the console window size in some way... :/ 
> ... any thoughts on how to make this more dynamic?

No, but again, we should be thinking about more than just terminal output.


> Improve .explain() Dialogue 
> 
>
> Key: TINKERPOP-1332
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1332
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.0-incubating
>Reporter: Russell Alexander Spitzer
>Assignee: Marko A. Rodriguez
>Priority: Minor
>
> Currently the output of explain gives you a long list of strategies but no 
> details about their application
> {code}
> ==>Traversal Explanation
> 
> Original Traversal [GraphStep(vertex,[]), CountGlobalStep]
> HaltedTraverserStrategy  [D]   [GraphStep(vertex,[]), CountGlobalStep]
> ConnectiveStrategy   [D]   [GraphStep(vertex,[]), CountGlobalStep]
> VertexProgramStrategy[D]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> OrderLimitStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IdentityRemovalStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> FilterRankingStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IncidentToAdjacentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> RangeByIsCountStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> AdjacentToIncidentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> MatchPredicateStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> GraphFilterStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> PathProcessorStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkInterceptorStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkSingleIterationStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ProfileStrategy  [F]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> LambdaRestrictionStrategy[V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ComputerVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> StandardVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> Final Traversal
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> {code}
> It would be helpful if filter strategies for example would list the filters 
> used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop issue #315: Remove dashes from labels and property keys

2016-06-15 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/315
  
@analytically did you happen to see my previous comment about 
rebasing/fixing conflicts on this PR so that we can begin code review/testing 
on our end? is that something you have some time to come back to soon?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TINKERPOP-1319) several FeatureRequirement annotations are incorrect in gremlin-test

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331743#comment-15331743
 ] 

ASF GitHub Bot commented on TINKERPOP-1319:
---

Github user pluradj commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/335#discussion_r67160532
  
--- Diff: 
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
 ---
@@ -280,10 +280,9 @@ public void 
shouldHaveExceptionConsistencyWhenIdNotSupportedForAddEdge() throws
 }
 
 @Test
-@FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
-@FeatureRequirement(featureClass = VertexPropertyFeatures.class, 
feature = FEATURE_INTEGER_VALUES)
+@FeatureRequirement(featureClass = 
Graph.Features.VertexFeatures.class, feature = 
Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
 public void shouldHaveStandardStringRepresentation() {
-final Vertex v = graph.addVertex("name", "marko", "age", 34);
+final Vertex v = graph.addVertex();
--- End diff --

Yeah, I thought about just adding the `FEATURE_INTEGER_VALUES` annotation, 
but it seemed to me like the test didn't have anything to do with properties. I 
can add another test to test with `toString()` with properties.


> several FeatureRequirement annotations are incorrect in gremlin-test
> 
>
> Key: TINKERPOP-1319
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1319
> Project: TinkerPop
>  Issue Type: Bug
>  Components: test-suite
>Affects Versions: 3.2.0-incubating, 3.1.2-incubating
>Reporter: Jason Plurad
>Assignee: Jason Plurad
>Priority: Minor
> Fix For: 3.1.3, 3.2.1
>
>
> Several {{@FeatureRequirement}} annotations are incorrect in these 
> {{gremlin-test}} tests
> * EdgeTest.java
> * FeatureSupportTest.java
> * GraphTest.java
> * PropertyTest.java
> * VertexPropertyTest.java
> * VertexTest.java
> I'll submit a patch for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop pull request #337: TINKERPOP-1332: Improve .explain() Dialogue

2016-06-15 Thread okram
GitHub user okram opened a pull request:

https://github.com/apache/tinkerpop/pull/337

TINKERPOP-1332: Improve .explain() Dialogue

https://issues.apache.org/jira/browse/TINKERPOP-1332

`TraversalExplanation.toString()` now supports word wrapping and 
`GraphFilter` information.

*First, here is word wrap in action*:

```
gremlin> g.V().out().out().out().out().count().explain()
==>Traversal Explanation

===
Original Traversal [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
CountGlobalStep]

ConnectiveStrategy   [D]   [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
CountGlobalStep]
RangeByIsCountStrategy   [O]   [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
CountGlobalStep]
IdentityRemovalStrategy  [O]   [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
CountGlobalStep]
IncidentToAdjacentStrategy   [O]   [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
CountGlobalStep]
AdjacentToIncidentStrategy   [O]   [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,edge), CountGlobalStep]
FilterRankingStrategy[O]   [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,edge), CountGlobalStep]
MatchPredicateStrategy   [O]   [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,edge), CountGlobalStep]
TinkerGraphStepStrategy  [P]   [TinkerGraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,edge), CountGlobalStep]
ProfileStrategy  [F]   [TinkerGraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,edge), CountGlobalStep]
StandardVerificationStrategy [V]   [TinkerGraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,edge), CountGlobalStep]

Final Traversal[TinkerGraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,edge), CountGlobalStep]
gremlin>
```

*Second, here is GraphFilter information in action.*

```
gremlin> g = TinkerFactory.createModern().traversal().withComputer()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], graphcomputer]
gremlin> g = g.withStrategies(GraphFilterStrategy.instance())
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], graphcomputer]
gremlin> g.V().out().out().out().out().count().explain()
==>Traversal Explanation

==
Original Traversal [GraphStep(vertex,[]), 
VertexStep(OUT,vertex), VertexStep(OUT,vertex), VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
CountGlobalStep]

VertexProgramStrategy[D]   
[TraversalVertexProgramStep([GraphStep(vertex,[]), VertexStep(OUT,vertex), 
VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
VertexStep(OUT,vertex), CountGlobalStep],graphfilter[none]),
  ComputerResultStep]
ConnectiveStrategy   [D]   
[TraversalVertexProgramStep([GraphStep(vertex,[]), VertexStep(OUT,vertex), 
VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
VertexStep(OUT,vertex), CountGlobalStep],graphfilter[none]),
  ComputerResultStep]
RangeByIsCountStrategy   [O]   
[TraversalVertexProgramStep([GraphStep(vertex,[]), VertexStep(OUT,vertex), 
VertexStep(OUT,vertex),
  VertexStep(OUT,vertex), 
VertexStep(OUT,vertex), 

[GitHub] tinkerpop pull request #335: TINKERPOP-1319: fix incorrect FeatureRequiremen...

2016-06-15 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/335#discussion_r67159933
  
--- Diff: 
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/FeatureSupportTest.java
 ---
@@ -587,7 +587,7 @@ public void 
shouldSupportRemoveEdgesIfEdgeCanBeRemoved() throws Exception {
 public void shouldSupportRemovePropertyIfAPropertyCanBeRemoved() 
throws Exception {
 try {
 final Vertex v = graph.addVertex();
-final Edge e = v.addEdge("self", v);
+final Edge e = v.addEdge("self", v, "name", "foo");
--- End diff --

good bug fix - i guess we haven't run afoul of that because most graphs 
will support property removal on edge.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TINKERPOP-1319) several FeatureRequirement annotations are incorrect in gremlin-test

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331730#comment-15331730
 ] 

ASF GitHub Bot commented on TINKERPOP-1319:
---

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/335
  
I would recommend adding something to the upgrade docs for graph providers, 
as this change will possibly open up some tests for folks and maybe introduce 
some breaks.


> several FeatureRequirement annotations are incorrect in gremlin-test
> 
>
> Key: TINKERPOP-1319
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1319
> Project: TinkerPop
>  Issue Type: Bug
>  Components: test-suite
>Affects Versions: 3.2.0-incubating, 3.1.2-incubating
>Reporter: Jason Plurad
>Assignee: Jason Plurad
>Priority: Minor
> Fix For: 3.1.3, 3.2.1
>
>
> Several {{@FeatureRequirement}} annotations are incorrect in these 
> {{gremlin-test}} tests
> * EdgeTest.java
> * FeatureSupportTest.java
> * GraphTest.java
> * PropertyTest.java
> * VertexPropertyTest.java
> * VertexTest.java
> I'll submit a patch for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop pull request #336: TINKERPOP-1320 fix GremlinGroovyScriptEngineFil...

2016-06-15 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/336#discussion_r67157460
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoWriter.java
 ---
@@ -131,7 +131,7 @@ public void writeVertexProperty(final OutputStream 
outputStream, final VertexPro
 public void writeProperty(final OutputStream outputStream, final 
Property p) throws IOException {
 final Output output = new Output(outputStream);
 writeHeader(output);
-kryo.writeObject(output, DetachedFactory.detach(p, true));
--- End diff --

that's weird as a standalone issue - @pluradj  what did this change have to 
do with TINKERPOP-1320 ?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TINKERPOP-1320) GremlinGroovyScriptEngineFileSandboxTest throws error: URI is not hierarchical

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331676#comment-15331676
 ] 

ASF GitHub Bot commented on TINKERPOP-1320:
---

Github user okram commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/336#discussion_r67155745
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoWriter.java
 ---
@@ -131,7 +131,7 @@ public void writeVertexProperty(final OutputStream 
outputStream, final VertexPro
 public void writeProperty(final OutputStream outputStream, final 
Property p) throws IOException {
 final Output output = new Output(outputStream);
 writeHeader(output);
-kryo.writeObject(output, DetachedFactory.detach(p, true));
--- End diff --

Is there any way that this may lead to a serialization format that is not 
backwards compatible?


> GremlinGroovyScriptEngineFileSandboxTest throws error: URI is not hierarchical
> --
>
> Key: TINKERPOP-1320
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1320
> Project: TinkerPop
>  Issue Type: Bug
>  Components: test-suite
>Affects Versions: 3.2.0-incubating, 3.1.2-incubating
>Reporter: Jason Plurad
>Assignee: Jason Plurad
>Priority: Minor
> Fix For: 3.1.3, 3.2.1
>
>
> This is similar to TINKERPOP-1317. The differences here are
> * The {{TestHelper.generateTempFileFromResource()}} call to load the resource 
> is happening from the {{public static void init()}} method before a graph 
> instance is available.
> * A reference to {{GremlinGroovyScriptEngineFileSandboxTest.class}} is still 
> required to located the {{sandbox.yaml}} found in the {{gremlin-test.jar}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TINKERPOP-1319) several FeatureRequirement annotations are incorrect in gremlin-test

2016-06-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331669#comment-15331669
 ] 

ASF GitHub Bot commented on TINKERPOP-1319:
---

GitHub user pluradj opened a pull request:

https://github.com/apache/tinkerpop/pull/335

TINKERPOP-1319: fix incorrect FeatureRequirement annotations

https://issues.apache.org/jira/browse/TINKERPOP-1319
Passed `mvn clean install -DincludeNeo4j` and integration tests cleanly.
May be CTR worthy. Let me know.
VOTE: +1


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

$ git pull https://github.com/apache/tinkerpop TINKERPOP-1319

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

https://github.com/apache/tinkerpop/pull/335.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 #335


commit 6fe943ff67cea8383afc6f046c175d89092601da
Author: Jason Plurad 
Date:   2016-06-15T12:51:43Z

fix incorrect FeatureRequirement annotations




> several FeatureRequirement annotations are incorrect in gremlin-test
> 
>
> Key: TINKERPOP-1319
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1319
> Project: TinkerPop
>  Issue Type: Bug
>  Components: test-suite
>Affects Versions: 3.2.0-incubating, 3.1.2-incubating
>Reporter: Jason Plurad
>Assignee: Jason Plurad
>Priority: Minor
> Fix For: 3.1.3, 3.2.1
>
>
> Several {{@FeatureRequirement}} annotations are incorrect in these 
> {{gremlin-test}} tests
> * EdgeTest.java
> * FeatureSupportTest.java
> * GraphTest.java
> * PropertyTest.java
> * VertexPropertyTest.java
> * VertexTest.java
> I'll submit a patch for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (TINKERPOP-1332) Improve .explain() Dialogue

2016-06-15 Thread Marko A. Rodriguez (JIRA)

 [ 
https://issues.apache.org/jira/browse/TINKERPOP-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marko A. Rodriguez reassigned TINKERPOP-1332:
-

Assignee: Marko A. Rodriguez

> Improve .explain() Dialogue 
> 
>
> Key: TINKERPOP-1332
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1332
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.0-incubating
>Reporter: Russell Alexander Spitzer
>Assignee: Marko A. Rodriguez
>Priority: Minor
>
> Currently the output of explain gives you a long list of strategies but no 
> details about their application
> {code}
> ==>Traversal Explanation
> 
> Original Traversal [GraphStep(vertex,[]), CountGlobalStep]
> HaltedTraverserStrategy  [D]   [GraphStep(vertex,[]), CountGlobalStep]
> ConnectiveStrategy   [D]   [GraphStep(vertex,[]), CountGlobalStep]
> VertexProgramStrategy[D]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> OrderLimitStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IdentityRemovalStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> FilterRankingStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IncidentToAdjacentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> RangeByIsCountStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> AdjacentToIncidentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> MatchPredicateStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> GraphFilterStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> PathProcessorStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkInterceptorStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkSingleIterationStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ProfileStrategy  [F]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> LambdaRestrictionStrategy[V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ComputerVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> StandardVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> Final Traversal
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> {code}
> It would be helpful if filter strategies for example would list the filters 
> used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TINKERPOP-1332) Improve .explain() Dialogue

2016-06-15 Thread Marko A. Rodriguez (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15331610#comment-15331610
 ] 

Marko A. Rodriguez commented on TINKERPOP-1332:
---

I have done two things.

1. TraversalExplanation.toString() word wraps at ",\n" break points.
2. Every {{VertexProgramStep}} toString() has the {{GraphFilter.toString()}} 
with it.



> Improve .explain() Dialogue 
> 
>
> Key: TINKERPOP-1332
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1332
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.0-incubating
>Reporter: Russell Alexander Spitzer
>Priority: Minor
>
> Currently the output of explain gives you a long list of strategies but no 
> details about their application
> {code}
> ==>Traversal Explanation
> 
> Original Traversal [GraphStep(vertex,[]), CountGlobalStep]
> HaltedTraverserStrategy  [D]   [GraphStep(vertex,[]), CountGlobalStep]
> ConnectiveStrategy   [D]   [GraphStep(vertex,[]), CountGlobalStep]
> VertexProgramStrategy[D]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> OrderLimitStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IdentityRemovalStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> FilterRankingStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> IncidentToAdjacentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> RangeByIsCountStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> AdjacentToIncidentStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> MatchPredicateStrategy   [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> GraphFilterStrategy  [O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> PathProcessorStrategy[O]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkInterceptorStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> SparkSingleIterationStrategy [P]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ProfileStrategy  [F]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> LambdaRestrictionStrategy[V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> ComputerVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> StandardVerificationStrategy [V]   
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> Final Traversal
> [TraversalVertexProgramStep([GraphStep(vertex,[]), CountGlobalStep]), 
> ComputerResultStep]
> {code}
> It would be helpful if filter strategies for example would list the filters 
> used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] tinkerpop pull request #333: if there is no edge label in the GraphML file, ...

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/333


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---