[GitHub] tinkerpop pull request #476: TINKERPOP-1292: TinkerGraphComputer VertexProgr...

2016-11-03 Thread okram
Github user okram commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/476#discussion_r86472253
  
--- Diff: 
neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
 ---
@@ -71,7 +71,6 @@
 @Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
 @Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
 @Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")

-@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.Neo4jStrategySuite")
--- End diff --

Yes. It is not the model we use for `TraversalStrategy` testing. I 
converted both Neo4j and TinkerGraph's strategy tests to the model we use in 
`core/`.


---
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-1292) TinkerGraphComputer VertexProgramInterceptors

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/tinkerpop/pull/476#discussion_r86472253
  
--- Diff: 
neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
 ---
@@ -71,7 +71,6 @@
 @Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
 @Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
 @Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")

-@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.Neo4jStrategySuite")
--- End diff --

Yes. It is not the model we use for `TraversalStrategy` testing. I 
converted both Neo4j and TinkerGraph's strategy tests to the model we use in 
`core/`.


> TinkerGraphComputer VertexProgramInterceptors
> -
>
> Key: TINKERPOP-1292
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1292
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process, tinkergraph
>Affects Versions: 3.2.0-incubating
>Reporter: Marko A. Rodriguez
> Fix For: 3.2.4
>
>
> Create {{TinkerGraphInterceptorStrategy}} for {{TinkerGraphComputer}} and 
> grow it starting with the two simple patterns below:
> {code}
> g.V().count() -> tinkerGraph.vertices.size()
> g.E().count() -> tinkerGraph.edges.size()
> {code}
> In fact, perhaps even create {{TinkerGraphCountStep}} for OLTP as well that 
> does the above.



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


[jira] [Created] (TINKERPOP-1545) IncidentToAdjacentStrategy is buggy

2016-11-03 Thread Daniel Kuppitz (JIRA)
Daniel Kuppitz created TINKERPOP-1545:
-

 Summary: IncidentToAdjacentStrategy is buggy
 Key: TINKERPOP-1545
 URL: https://issues.apache.org/jira/browse/TINKERPOP-1545
 Project: TinkerPop
  Issue Type: Bug
Affects Versions: 3.2.3, 3.1.4
Reporter: Daniel Kuppitz


{{IncidentToAdjacentStrategy}} turns {{outE().inV().simplePath()}} into 
{{out().simplePath()}}, which will return a wrong result as soon as there is 
more than 1 edge between a pair of vertices.

The set {{INVALIDATING_STEP_CLASSES}} should only contain 
{{PathProcessor.class}} and {{LambdaHolder.class}} Furthermore 
{{SimplePathStep}} should implement {{PathProcessor}}.



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


[jira] [Commented] (TINKERPOP-1292) TinkerGraphComputer VertexProgramInterceptors

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/tinkerpop/pull/476#discussion_r86465910
  
--- Diff: 
neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
 ---
@@ -71,7 +71,6 @@
 @Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
 @Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
 @Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")

-@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.Neo4jStrategySuite")
--- End diff --

Out of curiosity, when did we drop these? Was it a long time ago?


> TinkerGraphComputer VertexProgramInterceptors
> -
>
> Key: TINKERPOP-1292
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1292
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process, tinkergraph
>Affects Versions: 3.2.0-incubating
>Reporter: Marko A. Rodriguez
> Fix For: 3.2.4
>
>
> Create {{TinkerGraphInterceptorStrategy}} for {{TinkerGraphComputer}} and 
> grow it starting with the two simple patterns below:
> {code}
> g.V().count() -> tinkerGraph.vertices.size()
> g.E().count() -> tinkerGraph.edges.size()
> {code}
> In fact, perhaps even create {{TinkerGraphCountStep}} for OLTP as well that 
> does the above.



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


[GitHub] tinkerpop issue #475: TINKERPOP-1211: UnfoldStep should unfold arrays.

2016-11-03 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/475
  
All tests pass with `docker/build.sh -t -n -i`

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-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/481
  
Manual tests look good. `docker/build.sh -t -i -n` worked up to the point 
where it always fails for me in `tp32`.

VOTE: +1


> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
> at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
> at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
> at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
> at 
> 

[GitHub] tinkerpop issue #481: TINKERPOP-1428: profile() throws NPE for union(group, ...

2016-11-03 Thread dkuppitz
Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/481
  
Manual tests look good. `docker/build.sh -t -i -n` worked up to the point 
where it always fails for me in `tp32`.

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-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/tinkerpop/pull/481#discussion_r86396655
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java
 ---
@@ -45,7 +45,7 @@
 private char state = 'k';
 private Traversal.Admin keyTraversal = null;
 private Traversal.Admin preTraversal = null;
-private Traversal.Admin valueTraversal = 
this.integrateChild(__.fold().asAdmin());
+private Traversal.Admin valueTraversal = null;
--- End diff --

Huh. K. Fixed.


> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
> at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
> at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
> at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> 

[GitHub] tinkerpop pull request #481: TINKERPOP-1428: profile() throws NPE for union(...

2016-11-03 Thread okram
Github user okram commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/481#discussion_r86396655
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java
 ---
@@ -45,7 +45,7 @@
 private char state = 'k';
 private Traversal.Admin keyTraversal = null;
 private Traversal.Admin preTraversal = null;
-private Traversal.Admin valueTraversal = 
this.integrateChild(__.fold().asAdmin());
+private Traversal.Admin valueTraversal = null;
--- End diff --

Huh. K. Fixed.


---
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-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/tinkerpop/pull/481#discussion_r86388694
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java
 ---
@@ -45,7 +45,7 @@
 private char state = 'k';
 private Traversal.Admin keyTraversal = null;
 private Traversal.Admin preTraversal = null;
-private Traversal.Admin valueTraversal = 
this.integrateChild(__.fold().asAdmin());
+private Traversal.Admin valueTraversal = null;
--- End diff --

Wasted CPU cycles: http://www.javapractices.com/topic/TopicAction.do?Id=14


> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
> at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
> at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
> at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> 

[GitHub] tinkerpop pull request #481: TINKERPOP-1428: profile() throws NPE for union(...

2016-11-03 Thread dkuppitz
Github user dkuppitz commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/481#discussion_r86388694
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java
 ---
@@ -45,7 +45,7 @@
 private char state = 'k';
 private Traversal.Admin keyTraversal = null;
 private Traversal.Admin preTraversal = null;
-private Traversal.Admin valueTraversal = 
this.integrateChild(__.fold().asAdmin());
+private Traversal.Admin valueTraversal = null;
--- End diff --

Wasted CPU cycles: http://www.javapractices.com/topic/TopicAction.do?Id=14


---
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-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user okram opened a pull request:

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

TINKERPOP-1428: profile() throws NPE for union(group, group)

https://issues.apache.org/jira/browse/TINKERPOP-1428#

`GroupSideEffectStep` is "weird" in that it splits the `valueTraversal` 
into a pre- and post-traversals where the split is the first `Barrier`-step 
encountered. This makes it so that its possible for a local child to never be 
`next()'d` and thus, profiling never initialized for that step. The blanket fix 
is basically, if a metric is not initialized, don't include it in the profile 
results. As a side, I fixed a bug in `GroupXXXStep` around empty traverser set 
values (basically, don't include them).

VOTE +1.

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

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

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

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






> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at 

[GitHub] tinkerpop pull request #481: TINKERPOP-1428: profile() throws NPE for union(...

2016-11-03 Thread okram
GitHub user okram opened a pull request:

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

TINKERPOP-1428: profile() throws NPE for union(group, group)

https://issues.apache.org/jira/browse/TINKERPOP-1428#

`GroupSideEffectStep` is "weird" in that it splits the `valueTraversal` 
into a pre- and post-traversals where the split is the first `Barrier`-step 
encountered. This makes it so that its possible for a local child to never be 
`next()'d` and thus, profiling never initialized for that step. The blanket fix 
is basically, if a metric is not initialized, don't include it in the profile 
results. As a side, I fixed a bug in `GroupXXXStep` around empty traverser set 
values (basically, don't include them).

VOTE +1.

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

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

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

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






---
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.
---


Re: state of git

2016-11-03 Thread Stephen Mallette
you're supposed to be on vacation - not thinking about git. :)

personally, i like this flow as the git history stays pretty clean and easy
to follow. i think it would be harder if you upended it with cherry-pick as
that changes commit ids between branches.

On Thu, Nov 3, 2016 at 12:00 PM, Dylan Millikin 
wrote:

> With multiple branches set up as they are here, wouldn't it help to move to
> a more classical workflow, that is to push to master and then
> backport/cherry pick downwards? This comes with it's own set of
> implications but thought I would ask.
>
> On Thu, Nov 3, 2016 at 9:19 PM, Stephen Mallette 
> wrote:
>
> > ...and all is right with the world again...
> >
> > In case others are interested, the trouble here is that if I had merged
> my
> > tp32 to master with my change from tp31, then I would have brought
> Marko's
> > changes from tp32 to master. I wouldn't want to do that because I
> wouldn't
> > have been sure that Marko wanted that to happen. For all I knew he could
> > have been trying to fix a problem on master with his merge from tp32 and
> my
> > merging could have broken the branch. Ideally, you should only push your
> > own changes, so if you ever merge tp32 to master (for example) and there
> > are commits present that are not ones you did, you probably need to stop
> > and figure out what's going on.
> >
> > Here's how I noticed it:
> >
> > $ git checkout master
> > Switched to branch 'master'
> > $ git merge tp32
> > Auto-merging CHANGELOG.asciidoc
> > Merge made by the 'recursive' strategy.
> >  CHANGELOG.asciidoc
> >  |  2 ++
> >  docs/src/dev/provider/index.asciidoc
> >  |  2 +-
> >  docs/src/upgrade/release-3.1.x-incubating.asciidoc
> >  | 18
> > ++
> >  gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/
> > process/traversal/strategy/decoration/SubgraphStrategy.java
> > | 16 +++-
> >  gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/
> > process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
> > | 11 ++-
> >  gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/
> > process/traversal/util/TraversalHelper.java
> > | 21 +
> >  gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/
> > driver/Connection.java
> >|  2 +-
> >  gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/
> > server/op/session/SessionOpProcessor.java
> > |  5 +
> >  8 files changed, 61 insertions(+), 16 deletions(-)
> >
> > WHOA - I knew that I didn't touch SubgraphStrategy or
> > IncidentToAdjacentStrategy, so that looked fishy. So I get rid of all
> that
> > with:
> >
> > $ git reset --hard origin/master
> > HEAD is now at ea085f8 Merge branch 'tp32'
> >
> > and reset my local master branch back to what it was prior to the merge
> > (i.e what is at origin/master). After I emailed the list and ping'd marko
> > who promptly did the merge to master I did:
> >
> > $ git fetch origin
> > remote: Counting objects: 123, done.
> > remote: Compressing objects: 100% (8/8), done.
> > remote: Total 13 (delta 4), reused 0 (delta 0)
> > Unpacking objects: 100% (13/13), done.
> > From https://git-wip-us.apache.org/repos/asf/tinkerpop
> >ea085f8..eaad5a9  master -> origin/master
> > $ git rebase origin/master
> > First, rewinding head to replay your work on top of it...
> > Fast-forwarded master to origin/master.
> > $ git merge tp32
> > Auto-merging CHANGELOG.asciidoc
> > Merge made by the 'recursive' strategy.
> >  CHANGELOG.asciidoc
> >  |  1 +
> >  docs/src/dev/provider/index.asciidoc
> >  |  2 +-
> >  docs/src/upgrade/release-3.1.x-incubating.asciidoc
> >  | 18 ++
> >  gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/
> > driver/Connection.java
> >|  2 +-
> >  gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/
> > server/op/session/SessionOpProcessor.java
> > |  5 +
> >  5 files changed, 26 insertions(+), 2 deletions(-)
> >
> > So i applied marko's changes to master with git rebase, then merged my
> > local tp32 to master and now those two changes I wasn't responsible for
> are
> > gone. Then it's just a push doing master first and then tp32 (newest
> > release to oldest release order):
> >
> > $ git push origin master
> > Counting objects: 213, done.
> > Delta compression using up to 4 threads.
> > Compressing objects: 100% (32/32), done.
> > Writing objects: 100% (48/48), 3.44 KiB | 0 bytes/s, done.
> > Total 48 (delta 25), reused 0 (delta 0)
> > remote: tinkerpop git commit: Merge branch 'tp32'
> > remote: tinkerpop git commit: Merge branch 'tp31' into tp32
> > 

Re: state of git

2016-11-03 Thread Dylan Millikin
With multiple branches set up as they are here, wouldn't it help to move to
a more classical workflow, that is to push to master and then
backport/cherry pick downwards? This comes with it's own set of
implications but thought I would ask.

On Thu, Nov 3, 2016 at 9:19 PM, Stephen Mallette 
wrote:

> ...and all is right with the world again...
>
> In case others are interested, the trouble here is that if I had merged my
> tp32 to master with my change from tp31, then I would have brought Marko's
> changes from tp32 to master. I wouldn't want to do that because I wouldn't
> have been sure that Marko wanted that to happen. For all I knew he could
> have been trying to fix a problem on master with his merge from tp32 and my
> merging could have broken the branch. Ideally, you should only push your
> own changes, so if you ever merge tp32 to master (for example) and there
> are commits present that are not ones you did, you probably need to stop
> and figure out what's going on.
>
> Here's how I noticed it:
>
> $ git checkout master
> Switched to branch 'master'
> $ git merge tp32
> Auto-merging CHANGELOG.asciidoc
> Merge made by the 'recursive' strategy.
>  CHANGELOG.asciidoc
>  |  2 ++
>  docs/src/dev/provider/index.asciidoc
>  |  2 +-
>  docs/src/upgrade/release-3.1.x-incubating.asciidoc
>  | 18
> ++
>  gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/
> process/traversal/strategy/decoration/SubgraphStrategy.java
> | 16 +++-
>  gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/
> process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
> | 11 ++-
>  gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/
> process/traversal/util/TraversalHelper.java
> | 21 +
>  gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/
> driver/Connection.java
>|  2 +-
>  gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/
> server/op/session/SessionOpProcessor.java
> |  5 +
>  8 files changed, 61 insertions(+), 16 deletions(-)
>
> WHOA - I knew that I didn't touch SubgraphStrategy or
> IncidentToAdjacentStrategy, so that looked fishy. So I get rid of all that
> with:
>
> $ git reset --hard origin/master
> HEAD is now at ea085f8 Merge branch 'tp32'
>
> and reset my local master branch back to what it was prior to the merge
> (i.e what is at origin/master). After I emailed the list and ping'd marko
> who promptly did the merge to master I did:
>
> $ git fetch origin
> remote: Counting objects: 123, done.
> remote: Compressing objects: 100% (8/8), done.
> remote: Total 13 (delta 4), reused 0 (delta 0)
> Unpacking objects: 100% (13/13), done.
> From https://git-wip-us.apache.org/repos/asf/tinkerpop
>ea085f8..eaad5a9  master -> origin/master
> $ git rebase origin/master
> First, rewinding head to replay your work on top of it...
> Fast-forwarded master to origin/master.
> $ git merge tp32
> Auto-merging CHANGELOG.asciidoc
> Merge made by the 'recursive' strategy.
>  CHANGELOG.asciidoc
>  |  1 +
>  docs/src/dev/provider/index.asciidoc
>  |  2 +-
>  docs/src/upgrade/release-3.1.x-incubating.asciidoc
>  | 18 ++
>  gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/
> driver/Connection.java
>|  2 +-
>  gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/
> server/op/session/SessionOpProcessor.java
> |  5 +
>  5 files changed, 26 insertions(+), 2 deletions(-)
>
> So i applied marko's changes to master with git rebase, then merged my
> local tp32 to master and now those two changes I wasn't responsible for are
> gone. Then it's just a push doing master first and then tp32 (newest
> release to oldest release order):
>
> $ git push origin master
> Counting objects: 213, done.
> Delta compression using up to 4 threads.
> Compressing objects: 100% (32/32), done.
> Writing objects: 100% (48/48), 3.44 KiB | 0 bytes/s, done.
> Total 48 (delta 25), reused 0 (delta 0)
> remote: tinkerpop git commit: Merge branch 'tp32'
> remote: tinkerpop git commit: Merge branch 'tp31' into tp32
> remote: tinkerpop git commit: TINKERPOP-1544 Return confirmation on session
> close
> gTo https://git-wip-us.apache.org/repos/asf/tinkerpop.git/
>eaad5a9..3f57dfe  master -> master
> $ git push origin tp32
> Total 0 (delta 0), reused 0 (delta 0)
> remote: tinkerpop git commit: Merge branch 'tp31' into tp32
> remote: tinkerpop git commit: TINKERPOP-1544 Return confirmation on session
> close
> To https://git-wip-us.apache.org/repos/asf/tinkerpop.git/
>b4d0ef9..9e284f7  tp32 -> tp32
>
> All good!
>
>
> On Thu, Nov 3, 2016 at 10:31 AM, Marko 

[jira] [Closed] (TINKERPOP-1040) Remove deprecated SandboxExtension

2016-11-03 Thread stephen mallette (JIRA)

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

stephen mallette closed TINKERPOP-1040.
---
   Resolution: Done
 Assignee: stephen mallette
Fix Version/s: 3.3.0

> Remove deprecated SandboxExtension
> --
>
> Key: TINKERPOP-1040
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1040
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: groovy
>Affects Versions: 3.1.1-incubating
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>  Labels: breaking, deprecation
> Fix For: 3.3.0
>
>
> The `SandboxExtension` was probably not used much in my estimation.  If it 
> was removed I doubt there would be much suffering.  No real functionality 
> would be lost if this was removed.



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


[jira] [Closed] (TINKERPOP-1283) Remove deprecated ScriptExecutor

2016-11-03 Thread stephen mallette (JIRA)

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

stephen mallette closed TINKERPOP-1283.
---
   Resolution: Done
 Assignee: stephen mallette
Fix Version/s: 3.3.0

> Remove deprecated ScriptExecutor
> 
>
> Key: TINKERPOP-1283
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1283
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: groovy
>Affects Versions: 3.2.1
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>  Labels: breaking, deprecation
> Fix For: 3.3.0
>
>
> Removing {{ScriptExecutor}} shouldn't be too big a deal. I suppose someone 
> could be calling it directly from their own scripts/code, but it's more 
> likely that they were using {{bin/gremlin.sh -e script.groovy}} in which case 
> they won't break as that is backward compatible.  
> Be sure to also remove code in {{Console}} that is allowing {{bin/gremlin.sh 
> script.groovy}} as part of this. After this change, users should all be using 
> {{-i}} or {{-e}}.



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


[jira] [Closed] (TINKERPOP-1420) Remove deprecated ConcurrentBindings in gremlin-groovy

2016-11-03 Thread stephen mallette (JIRA)

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

stephen mallette closed TINKERPOP-1420.
---
   Resolution: Done
 Assignee: stephen mallette
Fix Version/s: 3.3.0

> Remove deprecated ConcurrentBindings in gremlin-groovy
> --
>
> Key: TINKERPOP-1420
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1420
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: groovy
>Affects Versions: 3.2.1
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>  Labels: breaking, deprecation
> Fix For: 3.3.0
>
>
> {{ConcurrentBindings}} were moved to to {{gremlin-core}} - the old class in 
> {{gremlin-groovy}} was deprecated and can be removed.



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


[GitHub] tinkerpop pull request #468: TINKERPOP-1420 Removal of previously deprecated...

2016-11-03 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-1490) Provider a Future based Traversal.async(Function<Traversal,V>) terminal step

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

Github user newkek commented on the issue:

https://github.com/apache/tinkerpop/pull/478
  
The issue with using a secondary thread pool that will start a new thread 
for each Traversal execution would be more important when the Traversal is 
backed by a RemoteConnection. Where each Traversal represents a "query" that is 
sent to a server, if the driver behind the RemoteConnection is able to handle 
tens of thousands of requests, the performance will still be limited to the 
number of threads the async thread pool can handle simultaneously, and there 
would be a big waste of CPU/Threads. 

Ideally as @jorgebay suggests with the strategies more of the TinkerPop lib 
would be changed to become fully async, where maybe synchronous methods would 
only be blocking calls to the async execution method(s) (`next()` calls 
`promise().get()`). 
The thread pool is still needed at some point though, since executing 
against a local TinkerGraph is currently done in the same thread, as a 
sequential operation so Returning with a Future, and Continuing to process the 
operation in the background has to be done in 2 separate threads simultaneously.

_just thinking out loud and I probably miss a lot of details_ There may be 
a way to have a method `submitAsync()` on the `RemoteConnection` that returns a 
Future of Traverser (instead of Traverser) that, associated with what @jorgebay 
suggests for the Strategies and _some other changes_ would allow the 
`promise()` call, when associated with a `RemoteConnection` not to create a new 
thread each time by default and simply return the Future returned with 
`RemoteConnection#submitAsync()`, and thus delegate the asynchronous execution 
to the RemoteConnection


> Provider a Future based Traversal.async(Function) terminal step
> 
>
> Key: TINKERPOP-1490
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1490
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language-variant, process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>
> [~mbroecheler] had the idea of adding a {{Traversal.async()}} method. This is 
> important for not only avoiding thread locking on a query in Gremlin, but 
> also, it will allow single threaded language variants like Gremlin-JavaScript 
> to use callbacks for processing query results.
> {code}
> Future result = 
> g.V().out().values("name").async(Traversal::toList)
> {code}
> {code}
> Future result = g.V().out().name.async{it.toList()}
> {code}
> {code}
> g.V().out().values('name').async((err,names) => {
>   // I don't know JavaScript, but ...
>   return list(names);
> }) 
> {code}
> ...



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


[GitHub] tinkerpop issue #478: TINKERPOP-1490 Implemented promise API for Traversal

2016-11-03 Thread newkek
Github user newkek commented on the issue:

https://github.com/apache/tinkerpop/pull/478
  
The issue with using a secondary thread pool that will start a new thread 
for each Traversal execution would be more important when the Traversal is 
backed by a RemoteConnection. Where each Traversal represents a "query" that is 
sent to a server, if the driver behind the RemoteConnection is able to handle 
tens of thousands of requests, the performance will still be limited to the 
number of threads the async thread pool can handle simultaneously, and there 
would be a big waste of CPU/Threads. 

Ideally as @jorgebay suggests with the strategies more of the TinkerPop lib 
would be changed to become fully async, where maybe synchronous methods would 
only be blocking calls to the async execution method(s) (`next()` calls 
`promise().get()`). 
The thread pool is still needed at some point though, since executing 
against a local TinkerGraph is currently done in the same thread, as a 
sequential operation so Returning with a Future, and Continuing to process the 
operation in the background has to be done in 2 separate threads simultaneously.

_just thinking out loud and I probably miss a lot of details_ There may be 
a way to have a method `submitAsync()` on the `RemoteConnection` that returns a 
Future of Traverser (instead of Traverser) that, associated with what @jorgebay 
suggests for the Strategies and _some other changes_ would allow the 
`promise()` call, when associated with a `RemoteConnection` not to create a new 
thread each time by default and simply return the Future returned with 
`RemoteConnection#submitAsync()`, and thus delegate the asynchronous execution 
to the RemoteConnection


---
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-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread Daniel Kuppitz (JIRA)

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

Daniel Kuppitz commented on TINKERPOP-1428:
---

Yea, I just figured that out too. Absolutely no issues in OLAP.

> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
> at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
> at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
> at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
> at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:124)
> at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
> at 
> 

[jira] [Commented] (TINKERPOP-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread Marko A. Rodriguez (JIRA)

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

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

Has nothing to do with nested traversals. This breaks:

{code}
gremlin> g.V().group('m').profile()
java.lang.NullPointerException
Type ':help' or ':h' for help.
Display stack trace? [yN]
{code}

> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
> at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
> at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
> at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
> at 
> 

Re: state of git

2016-11-03 Thread Marko Rodriguez
I don’t understand git.

I don’t understand rebasing.

I don’t understand what love is.

Marko.

http://markorodriguez.com



> On Nov 3, 2016, at 8:17 AM, Stephen Mallette  wrote:
> 
> just a quick note - the git repo is in a weird state atm. I accidentally
> pushed a change to tp31 thinking i would then instantly merge to
> tp32/master, but I think marko has a change on tp32 that he hasn't merged
> to master yet (so he basically did the same thing i did and pushed too
> early).
> 
> So right now, merging is sorta locked up behind marko's merge to master and
> I need to step away for a few minutes leaving git kinda weird.
> 
> Typically, the flow for a merge should involve getting the entire situation
> clear in all branches first before pushing. So if your change is on tp31,
> then merge it locally to tp32 and then merge tp32 to master locally -
> resolve conflicts and test as needed. Then when all good, push in reverse
> order to each of the branches. Using that same example, start with master
> and then go to tp32 and then tp31. I think that should limit weirdness if
> someone is pulling while you are pushing. The same logic would apply if you
> produced multiple pull requests for the same change which may become the
> norm at some point in the future.
> 
> Anyway, until we sort out the merge backup, please refrain from merging
> between branches. I'll be back online shortly.



[jira] [Commented] (TINKERPOP-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread Marko A. Rodriguez (JIRA)

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

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

Note that it works in OLAP.

{code}
gremlin> g.withComputer().V().repeat(group('m')).times(2).profile()
==>Traversal Metrics
Step   Count  
Traversers   Time (ms)% Dur
=
GraphStep(vertex,[])   6
   6   0.14442.24
RepeatStep([GroupSideEffectStep(m,[FoldStep, Pr... 6
   6   0.19757.76
  GroupSideEffectStep(m,[FoldStep, ProfileStep])  12
  12   0.064
FoldStep
   0.000
  RepeatEndStep (profiling ignored) 
   0.000
>TOTAL -
   -   0.342-
gremlin>
{code}

> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
> at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
> at 
> 

[jira] [Comment Edited] (TINKERPOP-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread Marko A. Rodriguez (JIRA)

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

Marko A. Rodriguez edited comment on TINKERPOP-1428 at 11/3/16 2:36 PM:


So, I've isolated it to {{GroupSideEffectStep}}.

{code}
gremlin> g.V().union(groupCount(),group()).profile()
==>Traversal Metrics
Step   Count  
Traversers   Time (ms)% Dur
=
TinkerGraphStep(vertex,[]) 6
   6   0.08321.89
UnionStep([[GroupCountStep, ProfileStep, EndSte... 2
   2   0.29778.11
  GroupCountStep   1
   1   0.037
  EndStep  1
   1   0.012
  GroupStep([FoldStep, ProfileStep])   1
   1   0.115
FoldStep   6
   6   0.050
  EndStep  1
   1   0.032
>TOTAL -
   -   0.380-
gremlin> g.V().union(groupCount('m'),group()).profile()
==>Traversal Metrics
Step   Count  
Traversers   Time (ms)% Dur
=
TinkerGraphStep(vertex,[]) 6
   6   0.05511.83
UnionStep([[GroupCountSideEffectStep(m), Profil... 7
   7   0.41588.17
  GroupCountSideEffectStep(m)  6
   6   0.104
  EndStep  6
   6   0.025
  GroupStep([FoldStep, ProfileStep])   1
   1   0.110
FoldStep   6
   6   0.044
  EndStep  1
   1   0.039
>TOTAL -
   -   0.470-
gremlin> g.V().union(groupCount(),group('m')).profile()
java.lang.NullPointerException
Type ':help' or ':h' for help.
Display stack trace? [yN]
{code}

And it behaves the same with {{choose()}}, {{repeat()}}, etc.

{code}
gremlin> g.V().repeat(group('m')).times(2).profile()
java.lang.NullPointerException
Type ':help' or ':h' for help.
Display stack trace? [yN]
{code}


was (Author: okram):
So, I've isolated it to `GroupSideEffectStep`.

```
gremlin> g.V().union(groupCount(),group()).profile()
==>Traversal Metrics
Step   Count  
Traversers   Time (ms)% Dur
=
TinkerGraphStep(vertex,[]) 6
   6   0.08321.89
UnionStep([[GroupCountStep, ProfileStep, EndSte... 2
   2   0.29778.11
  GroupCountStep   1
   1   0.037
  EndStep  1
   1   0.012
  GroupStep([FoldStep, ProfileStep])   1
   1   0.115
FoldStep   6
   6   0.050
  EndStep  1
   1   0.032
>TOTAL -
   -   0.380-
gremlin> g.V().union(groupCount('m'),group()).profile()
==>Traversal Metrics
Step   Count  
Traversers   Time (ms)% Dur
=
TinkerGraphStep(vertex,[]) 6
   6   0.05511.83
UnionStep([[GroupCountSideEffectStep(m), Profil... 7
   7   0.41588.17
  GroupCountSideEffectStep(m)  6
   6   0.104
  EndStep  6
   6   0.025
  GroupStep([FoldStep, ProfileStep])

[jira] [Commented] (TINKERPOP-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread Marko A. Rodriguez (JIRA)

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

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

So, I've isolated it to `GroupSideEffectStep`.

```
gremlin> g.V().union(groupCount(),group()).profile()
==>Traversal Metrics
Step   Count  
Traversers   Time (ms)% Dur
=
TinkerGraphStep(vertex,[]) 6
   6   0.08321.89
UnionStep([[GroupCountStep, ProfileStep, EndSte... 2
   2   0.29778.11
  GroupCountStep   1
   1   0.037
  EndStep  1
   1   0.012
  GroupStep([FoldStep, ProfileStep])   1
   1   0.115
FoldStep   6
   6   0.050
  EndStep  1
   1   0.032
>TOTAL -
   -   0.380-
gremlin> g.V().union(groupCount('m'),group()).profile()
==>Traversal Metrics
Step   Count  
Traversers   Time (ms)% Dur
=
TinkerGraphStep(vertex,[]) 6
   6   0.05511.83
UnionStep([[GroupCountSideEffectStep(m), Profil... 7
   7   0.41588.17
  GroupCountSideEffectStep(m)  6
   6   0.104
  EndStep  6
   6   0.025
  GroupStep([FoldStep, ProfileStep])   1
   1   0.110
FoldStep   6
   6   0.044
  EndStep  1
   1   0.039
>TOTAL -
   -   0.470-
gremlin> g.V().union(groupCount(),group('m')).profile()
java.lang.NullPointerException
Type ':help' or ':h' for help.
Display stack trace? [yN]
```

And it behaves the same with `choose()`, `repeat()`, etc.

```
gremlin> g.V().repeat(group('m')).times(2).profile()
java.lang.NullPointerException
Type ':help' or ':h' for help.
Display stack trace? [yN]
```

> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at 

state of git

2016-11-03 Thread Stephen Mallette
just a quick note - the git repo is in a weird state atm. I accidentally
pushed a change to tp31 thinking i would then instantly merge to
tp32/master, but I think marko has a change on tp32 that he hasn't merged
to master yet (so he basically did the same thing i did and pushed too
early).

So right now, merging is sorta locked up behind marko's merge to master and
I need to step away for a few minutes leaving git kinda weird.

Typically, the flow for a merge should involve getting the entire situation
clear in all branches first before pushing. So if your change is on tp31,
then merge it locally to tp32 and then merge tp32 to master locally -
resolve conflicts and test as needed. Then when all good, push in reverse
order to each of the branches. Using that same example, start with master
and then go to tp32 and then tp31. I think that should limit weirdness if
someone is pulling while you are pushing. The same logic would apply if you
produced multiple pull requests for the same change which may become the
norm at some point in the future.

Anyway, until we sort out the merge backup, please refrain from merging
between branches. I'll be back online shortly.


[jira] [Commented] (TINKERPOP-1428) profile() throws NPE for union(group, group)

2016-11-03 Thread Daniel Kuppitz (JIRA)

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

Daniel Kuppitz commented on TINKERPOP-1428:
---

This one is becoming really annoying. Over the last few weeks I wasn't able to 
{{.profile()}} a single traversal (note: I don't need to profile simple toy 
traversals, I'm talking about complex ones). The provided example is a simple 
one to reproduce the problem, but it seems like {{.profile()}} doesn't work for 
any traversal that has a bit of nested traversal complexity.

> profile() throws NPE for union(group, group)
> 
>
> Key: TINKERPOP-1428
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1428
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.1
>Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.V().union(group("m").by("name"), group("m").by("name")).profile()
> java.lang.NullPointerException
> Type ':help' or ':h' for help.
> Display stack trace? [yN]y
> java.lang.NullPointerException
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:239)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:251)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.handleNestedTraversals(DefaultTraversalMetrics.java:254)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics.setMetrics(DefaultTraversalMetrics.java:204)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep.hasNext(ProfileSideEffectStep.java:73)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processAllStarts(SupplyingBarrierStep.java:83)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep.processNextStart(SupplyingBarrierStep.java:70)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
> at 
> org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:179)
> at 
> org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:226)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
> at 
> org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:446)
> at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:190)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy)
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72)
> at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
> at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
> at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
> at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
> at 
> 

[jira] [Created] (TINKERPOP-1544) Return a confirmation of session close

2016-11-03 Thread stephen mallette (JIRA)
stephen mallette created TINKERPOP-1544:
---

 Summary: Return a confirmation of session close
 Key: TINKERPOP-1544
 URL: https://issues.apache.org/jira/browse/TINKERPOP-1544
 Project: TinkerPop
  Issue Type: Improvement
  Components: server
Affects Versions: 3.1.5
Reporter: stephen mallette
Assignee: stephen mallette
Priority: Critical
 Fix For: 3.1.6


While this is an improvement, it really sorta fixes a bug that can prevent 
certain tests from passing. By returning a confirmation of session close, it 
ensures that certain tests will always pass without having to rely on timers to 
simulate the situation.



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


[jira] [Assigned] (TINKERPOP-1471) IncidentToAdjacentStrategy use hidden marker to avoid repeated recursion.

2016-11-03 Thread Marko A. Rodriguez (JIRA)

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

Marko A. Rodriguez reassigned TINKERPOP-1471:
-

Assignee: Marko A. Rodriguez  (was: Daniel Kuppitz)

> IncidentToAdjacentStrategy use hidden marker to avoid repeated recursion.
> -
>
> Key: TINKERPOP-1471
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1471
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>Assignee: Marko A. Rodriguez
> Fix For: 3.2.4
>
>
> TINKERPOP-1456 introduces the notion that "hidden labels" on steps will be 
> removed from the traversal prior to evaluation. This use of "hidden labels" 
> was necessary for {{SubgraphStrategy}} and it is not always possible to 
> remove the add "hidden labels" in {{SubgraphStrategy}} completely. Thus, 
> prior to evaluation, in hidden labels are removed.
> This concept of "hidden labels" is useful for marking steps in a traversal so 
> that  a strategy applied at a child gets information from the strategy 
> applied at a parent.
> This can be used to make {{IncidentToAdjacentStrategy}} faster. In 
> particular, the following recursion is called repeatedly for each child.
> {code}
>   if 
> (TraversalHelper.hasStepOfAssignableClassRecursively(INVALIDATING_STEP_CLASSES,
>  TraversalHelper.getRootTraversal(traversal)))
> return;
> {code}
> Instead, it would be smart to do this and then, you don't need to recurse 
> from the root traversal over and over again.
> {code}
> private final void addMarkerToChildren(final Traversal.Admin 
> traversal) {
> traversal.getStartStep().addLabel(MARKER);
> for (final Step step : traversal.getSteps()) {
> if (step instanceof TraversalParent) {
> ((TraversalParent) 
> step).getLocalChildren().forEach(this::addMarkerToChildren);
> ((TraversalParent) 
> step).getGlobalChildren().forEach(this::addMarkerToChildren);
> }
> }
> }
> public void apply(Traversal traversal) {
>   if(traversal.getParent() instanceof EmptyStep) {
> boolean mark = 
> TraversalHelper.hasStepOfAssignableClassRecursively(INVALIDATING_STEP_CLASSES,
>  traversal)
> if(mark)  this.addMarkerToChildren(traversal)
>   }
>   // if the marker exists, don't optimize
>   if(traversal.getStartStep().getLabels().contains(MARKER)) {
> traversal.getStartStep().removeLabel(MARKER);
> return;
>   }
> // else do the rest of the code.
> }
> {code}



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


[GitHub] tinkerpop pull request #474: TINKERPOP-1471: IncidentToAdjacentStrategy use ...

2016-11-03 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-1471) IncidentToAdjacentStrategy use hidden marker to avoid repeated recursion.

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

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


> IncidentToAdjacentStrategy use hidden marker to avoid repeated recursion.
> -
>
> Key: TINKERPOP-1471
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1471
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>Assignee: Daniel Kuppitz
>
> TINKERPOP-1456 introduces the notion that "hidden labels" on steps will be 
> removed from the traversal prior to evaluation. This use of "hidden labels" 
> was necessary for {{SubgraphStrategy}} and it is not always possible to 
> remove the add "hidden labels" in {{SubgraphStrategy}} completely. Thus, 
> prior to evaluation, in hidden labels are removed.
> This concept of "hidden labels" is useful for marking steps in a traversal so 
> that  a strategy applied at a child gets information from the strategy 
> applied at a parent.
> This can be used to make {{IncidentToAdjacentStrategy}} faster. In 
> particular, the following recursion is called repeatedly for each child.
> {code}
>   if 
> (TraversalHelper.hasStepOfAssignableClassRecursively(INVALIDATING_STEP_CLASSES,
>  TraversalHelper.getRootTraversal(traversal)))
> return;
> {code}
> Instead, it would be smart to do this and then, you don't need to recurse 
> from the root traversal over and over again.
> {code}
> private final void addMarkerToChildren(final Traversal.Admin 
> traversal) {
> traversal.getStartStep().addLabel(MARKER);
> for (final Step step : traversal.getSteps()) {
> if (step instanceof TraversalParent) {
> ((TraversalParent) 
> step).getLocalChildren().forEach(this::addMarkerToChildren);
> ((TraversalParent) 
> step).getGlobalChildren().forEach(this::addMarkerToChildren);
> }
> }
> }
> public void apply(Traversal traversal) {
>   if(traversal.getParent() instanceof EmptyStep) {
> boolean mark = 
> TraversalHelper.hasStepOfAssignableClassRecursively(INVALIDATING_STEP_CLASSES,
>  traversal)
> if(mark)  this.addMarkerToChildren(traversal)
>   }
>   // if the marker exists, don't optimize
>   if(traversal.getStartStep().getLabels().contains(MARKER)) {
> traversal.getStartStep().removeLabel(MARKER);
> return;
>   }
> // else do the rest of the code.
> }
> {code}



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


[jira] [Commented] (TINKERPOP-1543) Create a distinct language archetype.

2016-11-03 Thread stephen mallette (JIRA)

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

stephen mallette commented on TINKERPOP-1543:
-

It's best to think of an archetype as a "template that works" - so a working 
sample that someone could modify and turn into their own working code. It 
sounds like this could fit that purpose. I've often thought an archetype of 
Graph providers would be useful too, but the problem is that for the effort 
involved there weren't enough Graph providers to really benefit. 

Anyway, if you want to go the archetype route, which I think makes sense, I 
would get most of your project fleshed out as a standalone project first (i.e. 
get it working and near "done"), then translate it into a archetype and 
test/debug the archetype. Archetype development can get a little tedious for 
more complex projects because you aren't coding the code, you are writing a 
template to be used later to build a project. So your first step should be 
"working project" and then the second step is how best to template it. 

I think archetypes are a very neat way to demonstrate a concept. It's like 
working documentation that ends up being useful to a developer as an artifact.  

> Create a distinct language archetype.
> -
>
> Key: TINKERPOP-1543
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1543
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: documentation, language-variant
>Affects Versions: 3.2.3
>Reporter: Marko A. Rodriguez
>Assignee: Marko A. Rodriguez
>
> I want to do a "demo language" to show people how to create a language that 
> compiles to Gremlin bytecode.
> I believe this should be done via the {{gremlin-archetype}} framework?? (cc/ 
> [~spmallette].
> The language would be the 2D "pipe" language discussed on gremlin-users@. 
> List of potential names for the language:
> * GremlinDimensions
> * gThang
> * 2g
> * StraightG
> This archetype would include:
> 1. A language parser.
> 2. Connectivity to the process test suite.
> 3. Documentation.
> If [~spmallette] or [~dkuppitz] could set me up a branch with the "archetype" 
> stubbed, that would be super helpful and I can then nerd out from there.



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


[jira] [Commented] (TINKERPOP-1471) IncidentToAdjacentStrategy use hidden marker to avoid repeated recursion.

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/474
  
All tests pass with `docker/build.sh -t -n -i`

VOTE +1


> IncidentToAdjacentStrategy use hidden marker to avoid repeated recursion.
> -
>
> Key: TINKERPOP-1471
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1471
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>Assignee: Daniel Kuppitz
>
> TINKERPOP-1456 introduces the notion that "hidden labels" on steps will be 
> removed from the traversal prior to evaluation. This use of "hidden labels" 
> was necessary for {{SubgraphStrategy}} and it is not always possible to 
> remove the add "hidden labels" in {{SubgraphStrategy}} completely. Thus, 
> prior to evaluation, in hidden labels are removed.
> This concept of "hidden labels" is useful for marking steps in a traversal so 
> that  a strategy applied at a child gets information from the strategy 
> applied at a parent.
> This can be used to make {{IncidentToAdjacentStrategy}} faster. In 
> particular, the following recursion is called repeatedly for each child.
> {code}
>   if 
> (TraversalHelper.hasStepOfAssignableClassRecursively(INVALIDATING_STEP_CLASSES,
>  TraversalHelper.getRootTraversal(traversal)))
> return;
> {code}
> Instead, it would be smart to do this and then, you don't need to recurse 
> from the root traversal over and over again.
> {code}
> private final void addMarkerToChildren(final Traversal.Admin 
> traversal) {
> traversal.getStartStep().addLabel(MARKER);
> for (final Step step : traversal.getSteps()) {
> if (step instanceof TraversalParent) {
> ((TraversalParent) 
> step).getLocalChildren().forEach(this::addMarkerToChildren);
> ((TraversalParent) 
> step).getGlobalChildren().forEach(this::addMarkerToChildren);
> }
> }
> }
> public void apply(Traversal traversal) {
>   if(traversal.getParent() instanceof EmptyStep) {
> boolean mark = 
> TraversalHelper.hasStepOfAssignableClassRecursively(INVALIDATING_STEP_CLASSES,
>  traversal)
> if(mark)  this.addMarkerToChildren(traversal)
>   }
>   // if the marker exists, don't optimize
>   if(traversal.getStartStep().getLabels().contains(MARKER)) {
> traversal.getStartStep().removeLabel(MARKER);
> return;
>   }
> // else do the rest of the code.
> }
> {code}



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


[GitHub] tinkerpop issue #474: TINKERPOP-1471: IncidentToAdjacentStrategy use hidden ...

2016-11-03 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/474
  
All tests pass with `docker/build.sh -t -n -i`

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-1490) Provider a Future based Traversal.async(Function<Traversal,V>) terminal step

2016-11-03 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/478
  
> What makes `toListAsync()` more "fully async" compared to 
`promise(traversal::toList)`? Internally, from a Java perspective anyway, 
`toListAsync()` does the same thing, doesn't it?

By fully async I meant asynchronous execution that doesn't block in any 
call and doesn't require a threadpool. All the way down, it would be based on 
futures / async operations. In java, it would mean no 
`CompletableFuture::get()` calls.
That translates into supporting higher levels of concurrency as there is no 
threadpool limiting the amount of calls in parallel.

For TinkerPop, it would require asynchronous strategies as currently the 
blocking calls are made in the `apply()` method. I've suggested an 
`applyAsync()` method for an async strategy interface that returns a 
`CompletableFuture`.

For other technologies, the same logic applies as we shouldn't care about 
the underlying framework / network library (Python tornado / libuv / ...) or 
thread pools.
For C#, it would be `Task` all the way down; for Python it could be async 
generators or futures all the way down; for Javascript, Promise or async 
callbacks; ...


> Provider a Future based Traversal.async(Function) terminal step
> 
>
> Key: TINKERPOP-1490
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1490
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language-variant, process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>
> [~mbroecheler] had the idea of adding a {{Traversal.async()}} method. This is 
> important for not only avoiding thread locking on a query in Gremlin, but 
> also, it will allow single threaded language variants like Gremlin-JavaScript 
> to use callbacks for processing query results.
> {code}
> Future result = 
> g.V().out().values("name").async(Traversal::toList)
> {code}
> {code}
> Future result = g.V().out().name.async{it.toList()}
> {code}
> {code}
> g.V().out().values('name').async((err,names) => {
>   // I don't know JavaScript, but ...
>   return list(names);
> }) 
> {code}
> ...



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


[GitHub] tinkerpop issue #478: TINKERPOP-1490 Implemented promise API for Traversal

2016-11-03 Thread jorgebay
Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/478
  
> What makes `toListAsync()` more "fully async" compared to 
`promise(traversal::toList)`? Internally, from a Java perspective anyway, 
`toListAsync()` does the same thing, doesn't it?

By fully async I meant asynchronous execution that doesn't block in any 
call and doesn't require a threadpool. All the way down, it would be based on 
futures / async operations. In java, it would mean no 
`CompletableFuture::get()` calls.
That translates into supporting higher levels of concurrency as there is no 
threadpool limiting the amount of calls in parallel.

For TinkerPop, it would require asynchronous strategies as currently the 
blocking calls are made in the `apply()` method. I've suggested an 
`applyAsync()` method for an async strategy interface that returns a 
`CompletableFuture`.

For other technologies, the same logic applies as we shouldn't care about 
the underlying framework / network library (Python tornado / libuv / ...) or 
thread pools.
For C#, it would be `Task` all the way down; for Python it could be async 
generators or futures all the way down; for Javascript, Promise or async 
callbacks; ...


---
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.
---