[GitHub] [tinkerpop] spmallette commented on issue #1010: TINKERPOP-2075 Added ReferenceElementStrategy

2018-12-03 Thread GitHub
yeah.i'll sleep on that. wasn't sure what to do with it. such a dumb 
little step. 

oh, i wanted to askthis should be a finalization strategy right? i tried it 
as a decoration at first and it didn't work right, so i figured it needed to be 
applied at the end and that seemed to fix things. :man_shrugging:  should i 
have done something else?

[ Full content available at: https://github.com/apache/tinkerpop/pull/1010 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[GitHub] [tinkerpop] otaviojava commented on issue #1001: uses the directly field instead of getter method

2018-12-03 Thread GitHub
Hey everyone. 
First, sorry by delay, I did a test with this code below:

```java
@Warmup(iterations = 5, time = 1)
@Measurement(iterations = 20, time = 1)
@Fork(3)
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@State(Scope.Thread)
public class ClientBenchmark {

private final ObjectMapper mapper = 
GraphSONMapper.build().version(GraphSONVersion.V3_0).create().createMapper();
private final Graph graph = TinkerFactory.createModern();
private final Vertex vertex = graph.traversal().V().next();

@Setup
public void setup() {
}

@Benchmark
public String write() throws JsonProcessingException {
return mapper.writeValueAsString(vertex);
}
}
```


As you can see I seted the **Throughput** that Measures the number of 
operations per second, meaning the number of times per second your benchmark 
method could be executed. Thereby, higher is better.

To set the dependency, I just changed the core version to do this test:

```xml

 org.apache.tinkerpop
 gremlin-core
 3.3.4
 
 
```

## The result

Changed code: 

Benchmark   Mode  CntScore
ClientBenchmark.write  thrpt   60  598,397


Current code:

Benchmark   Mode  CntScore
ClientBenchmark.write  thrpt   60  580,662

As you can see the changed code is faster around 10%.

[ Full content available at: https://github.com/apache/tinkerpop/pull/1001 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[GitHub] [tinkerpop] dkuppitz commented on issue #1010: TINKERPOP-2075 Added ReferenceElementStrategy

2018-12-03 Thread GitHub
Do you have a scenario in mind where providers would construct a new 
`ReferenceElement` step? I don't think it's necessary and I guess if you would 
have thought of such a scenario, you wouldn't have nested the class inside 
`ReferenceElementStrategy`; hence I think `ReferenceElement` constructor can be 
package-private.

Anyway, since this is just a minor thing ...

VOTE +1

[ Full content available at: https://github.com/apache/tinkerpop/pull/1010 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[jira] [Closed] (TINKERPOP-2018) Generate API docs for Gremlin.Net

2018-12-03 Thread stephen mallette (JIRA)


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

stephen mallette closed TINKERPOP-2018.
---
   Resolution: Done
Fix Version/s: 3.3.5
   3.4.0

> Generate API docs for Gremlin.Net
> -
>
> Key: TINKERPOP-2018
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2018
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: build-release, documentation, dotnet
>Reporter: Florian Hockmann
>Assignee: stephen mallette
>Priority: Major
> Fix For: 3.4.0, 3.3.5
>
> Attachments: junk.png
>
>
> Similar to TINKERPOP-2010 which handles doc generation for 
> gremlin-javascript, we should also generate and publish API docs for 
> Gremlin.Net. We already have the necessary XML documentation comments in 
> place for this.
> The docs could be generated with [DocFX|https://dotnet.github.io/docfx/] 
> which I already used for [the API docs of the old pre-TinkerPop version of 
> Gremlin.Net|https://florianhockmann.github.io/Gremlin.Net/api/Gremlin.Net.html].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-2075) Introduce ReferenceElementStrategy

2018-12-03 Thread ASF GitHub Bot (JIRA)


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

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

spmallette opened a new pull request #1010: TINKERPOP-2075 Added 
ReferenceElementStrategy
URL: https://github.com/apache/tinkerpop/pull/1010
 
 
   This strategy converts all graph elements to references. Configured this 
strategy in Gremlin Server by default for the example graphs. Made a few minor 
updates to tests that were assuming the return of "detached" elements.
   
   All tests pass with `docker/build.sh -t -i`
   
   VOTE +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Introduce ReferenceElementStrategy
> --
>
> Key: TINKERPOP-2075
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2075
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
>
> Introduce {{ReferenceElementStrategy}} to auto detach graph elements as 
> references and configure it for default graphs in Gremlin Server. This will 
> start to help to align all usage of Gremlin around "reference" elements no 
> matter how users connect (i.e. GLVs, embedded, Gremlin Server, etc.). 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-2018) Generate API docs for Gremlin.Net

2018-12-03 Thread ASF GitHub Bot (JIRA)


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

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

spmallette closed pull request #1007: TINKERPOP-2018 Generate API docs for .NET
URL: https://github.com/apache/tinkerpop/pull/1007
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Generate API docs for Gremlin.Net
> -
>
> Key: TINKERPOP-2018
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2018
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: build-release, documentation, dotnet
>Reporter: Florian Hockmann
>Assignee: stephen mallette
>Priority: Major
> Fix For: 3.4.0, 3.3.5
>
> Attachments: junk.png
>
>
> Similar to TINKERPOP-2010 which handles doc generation for 
> gremlin-javascript, we should also generate and publish API docs for 
> Gremlin.Net. We already have the necessary XML documentation comments in 
> place for this.
> The docs could be generated with [DocFX|https://dotnet.github.io/docfx/] 
> which I already used for [the API docs of the old pre-TinkerPop version of 
> Gremlin.Net|https://florianhockmann.github.io/Gremlin.Net/api/Gremlin.Net.html].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [tinkerpop] spmallette closed pull request #1007: TINKERPOP-2018 Generate API docs for .NET

2018-12-03 Thread GitHub
[ pull request closed by spmallette ]

[ Full content available at: https://github.com/apache/tinkerpop/pull/1007 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[GitHub] [tinkerpop] spmallette opened pull request #1010: TINKERPOP-2075 Added ReferenceElementStrategy

2018-12-03 Thread GitHub
This strategy converts all graph elements to references. Configured this 
strategy in Gremlin Server by default for the example graphs. Made a few minor 
updates to tests that were assuming the return of "detached" elements.

All tests pass with `docker/build.sh -t -i`

VOTE +1

[ Full content available at: https://github.com/apache/tinkerpop/pull/1010 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[jira] [Commented] (TINKERPOP-2014) Allow an ability to specify seeding for random methods such as coin, sample and Order.shuffle

2018-12-03 Thread stephen mallette (JIRA)


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

stephen mallette commented on TINKERPOP-2014:
-

The above PR was just referenced incorrectly - had nothing to do with this 
issue.

> Allow an ability to specify seeding for random methods such as coin, sample 
> and Order.shuffle
> -
>
> Key: TINKERPOP-2014
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2014
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.3.3
>Reporter: Sam Rosen
>Priority: Minor
>
> Currently, all the methods that have non-deterministic behavior such as coin 
> and sample have no ability to set a seed. The ability to set a seed will 
> allow for reproducible and testable behavior as well as more control flow for 
> random processes. If a certain backend does not support seeding, they could 
> simply ignore it. Some possible API changes:
> graph.traversal.V().withSeed(2L).coin(.5)
> graph.traversal.V().sample(3, 0L)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-2109) gremlin subgraph step fail when vertices contains properties with null values

2018-12-03 Thread Bruno Supiot (JIRA)


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

Bruno Supiot commented on TINKERPOP-2109:
-

Thank you for your (very) fast answer.
We will consider your suggestions.

Bruno Supiot

-Message d'origine-
De : stephen mallette (JIRA)  
Envoyé : lundi 3 décembre 2018 18:35
À : Bruno SUPIOT 
Objet : [jira] [Closed] (TINKERPOP-2109) gremlin subgraph step fail when 
vertices contains properties with null values


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

stephen mallette closed TINKERPOP-2109.
---
Resolution: Not A Bug

I don't think there is much we can do to change this. As a rule, TinkerPop 
doesn't allow {{null}} properties and TinkerGraph adheres to that. I have a 
couple of workarounds to consider:

Wrap {{TinkerGraph}} in a new {{Graph}} instance and trap the calls to 
{{TinkerVertex.property()}} and deal with the nulls. Then subgraph into you 
wrapper instead of the default TinkerGraph.  

Or, {{SubgraphStep}} is really simple - write a custom {{SubgraphStep}} and a 
OrientDB {{TraversalStrategy}} that replaces the TinkerPop {{SubgraphStep}} 
with yours. Basically just need to change this line:

https://github.com/apache/tinkerpop/blob/ec13939b799868018de37a725a511de80f5d6683/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphStep.java#L119

That would be a good contribution to OrientDB. I think doing your an OrientDB 
specific {{SubgraphStep}} would be the best way to handle this actually. I'd 
only consider the TinkerGraph-wrapping as a last resort.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


> gremlin subgraph step fail when vertices contains properties with null values
> -
>
> Key: TINKERPOP-2109
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2109
> Project: TinkerPop
>  Issue Type: Bug
>  Components: tinkergraph
>Affects Versions: 3.3.4
>Reporter: Bruno Supiot
>Priority: Major
>
> We are currently using OrientDB as graph database backend. OrientDB allows 
> properties with null values. The orientdb database is requested with 
> Groovy/Gremlin request.
> When we are requesting for a 'subgraph' step (which use the tinkergraph on 
> memory database for creating the subgraph), an exception is thrown when the 
> vertex of Orientdb contains properties with null values:
> Part of the exception trace:
> Caused by: 
> com.orientechnologies.orient.core.exception.OCommandExecutionException: Error 
> on execution of the GREMLIN script
>      DB name="connectitdb"
>      at 
> org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:78)
>      at 
> org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:54)
>      at 
> com.activus.connectit.storage.service.graph.TinkerpopGraphService.executeGroovyGremlinScript(TinkerpopGraphService.java:149)
>      ... 105 common frames omitted
>  Caused by: javax.script.ScriptException: javax.script.ScriptException: 
> java.lang.IllegalArgumentException: Property value can not be null
>      at 
> org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:406)
>      at 
> javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
>      at 
> org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:72)
>      ... 107 common frames omitted
>  Caused by: javax.script.ScriptException: java.lang.IllegalArgumentException: 
> Property value can not be null
>      at 
> org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:722)
>      at 
> org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:404)
>      ... 109 common frames omitted
> Caused by: java.lang.IllegalArgumentException: Property value can not be null
>      at 
> org.apache.tinkerpop.gremlin.structure.Property$Exceptions.propertyValueCanNotBeNull(Property.java:143)
>      at 
> org.apache.tinkerpop.gremlin.structure.util.ElementHelper.validateProperty(ElementHelper.java:97)
>      at 
> org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex.property(TinkerVertex.java:87)
>      at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.lambda$getOrCreate$2(SubgraphStep.java:119)
>      at java.util.Iterator.forEachRemaining(Iterator.java:116)
> 

[jira] [Closed] (TINKERPOP-2109) gremlin subgraph step fail when vertices contains properties with null values

2018-12-03 Thread stephen mallette (JIRA)


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

stephen mallette closed TINKERPOP-2109.
---
Resolution: Not A Bug

I don't think there is much we can do to change this. As a rule, TinkerPop 
doesn't allow {{null}} properties and TinkerGraph adheres to that. I have a 
couple of workarounds to consider:

Wrap {{TinkerGraph}} in a new {{Graph}} instance and trap the calls to 
{{TinkerVertex.property()}} and deal with the nulls. Then subgraph into you 
wrapper instead of the default TinkerGraph.  

Or, {{SubgraphStep}} is really simple - write a custom {{SubgraphStep}} and a 
OrientDB {{TraversalStrategy}} that replaces the TinkerPop {{SubgraphStep}} 
with yours. Basically just need to change this line:

https://github.com/apache/tinkerpop/blob/ec13939b799868018de37a725a511de80f5d6683/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphStep.java#L119

That would be a good contribution to OrientDB. I think doing your an OrientDB 
specific {{SubgraphStep}} would be the best way to handle this actually. I'd 
only consider the TinkerGraph-wrapping as a last resort.

> gremlin subgraph step fail when vertices contains properties with null values
> -
>
> Key: TINKERPOP-2109
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2109
> Project: TinkerPop
>  Issue Type: Bug
>  Components: tinkergraph
>Affects Versions: 3.3.4
>Reporter: Bruno Supiot
>Priority: Major
>
> We are currently using OrientDB as graph database backend. OrientDB allows 
> properties with null values. The orientdb database is requested with 
> Groovy/Gremlin request.
> When we are requesting for a 'subgraph' step (which use the tinkergraph on 
> memory database for creating the subgraph), an exception is thrown when the 
> vertex of Orientdb contains properties with null values:
> Part of the exception trace:
> Caused by: 
> com.orientechnologies.orient.core.exception.OCommandExecutionException: Error 
> on execution of the GREMLIN script
>      DB name="connectitdb"
>      at 
> org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:78)
>      at 
> org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:54)
>      at 
> com.activus.connectit.storage.service.graph.TinkerpopGraphService.executeGroovyGremlinScript(TinkerpopGraphService.java:149)
>      ... 105 common frames omitted
>  Caused by: javax.script.ScriptException: javax.script.ScriptException: 
> java.lang.IllegalArgumentException: Property value can not be null
>      at 
> org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:406)
>      at 
> javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
>      at 
> org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:72)
>      ... 107 common frames omitted
>  Caused by: javax.script.ScriptException: java.lang.IllegalArgumentException: 
> Property value can not be null
>      at 
> org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:722)
>      at 
> org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:404)
>      ... 109 common frames omitted
> Caused by: java.lang.IllegalArgumentException: Property value can not be null
>      at 
> org.apache.tinkerpop.gremlin.structure.Property$Exceptions.propertyValueCanNotBeNull(Property.java:143)
>      at 
> org.apache.tinkerpop.gremlin.structure.util.ElementHelper.validateProperty(ElementHelper.java:97)
>      at 
> org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex.property(TinkerVertex.java:87)
>      at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.lambda$getOrCreate$2(SubgraphStep.java:119)
>      at java.util.Iterator.forEachRemaining(Iterator.java:116)
>      at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.getOrCreate(SubgraphStep.java:117)
>      at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.addEdgeToSubgraph(SubgraphStep.java:135)
>      at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.sideEffect(SubgraphStep.java:80)
>      at 
> org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep.processNextStart(SideEffectStep.java:39)
>      at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
>      

[jira] [Updated] (TINKERPOP-2109) gremlin subgraph step fail when vertices contains properties with null values

2018-12-03 Thread Bruno Supiot (JIRA)


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

Bruno Supiot updated TINKERPOP-2109:

Description: 
We are currently using OrientDB as graph database backend. OrientDB allows 
properties with null values. The orientdb database is requested with 
Groovy/Gremlin request.

When we are requesting for a 'subgraph' step (which use the tinkergraph on 
memory database for creating the subgraph), an exception is thrown when the 
vertex of Orientdb contains properties with null values:

Part of the exception trace:

Caused by: 
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error 
on execution of the GREMLIN script
     DB name="connectitdb"
     at 
org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:78)
     at 
org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:54)
     at 
com.activus.connectit.storage.service.graph.TinkerpopGraphService.executeGroovyGremlinScript(TinkerpopGraphService.java:149)
     ... 105 common frames omitted
 Caused by: javax.script.ScriptException: javax.script.ScriptException: 
java.lang.IllegalArgumentException: Property value can not be null
     at 
org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:406)
     at 
javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
     at 
org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:72)
     ... 107 common frames omitted
 Caused by: javax.script.ScriptException: java.lang.IllegalArgumentException: 
Property value can not be null
     at 
org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:722)
     at 
org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:404)
     ... 109 common frames omitted

Caused by: java.lang.IllegalArgumentException: Property value can not be null
     at 
org.apache.tinkerpop.gremlin.structure.Property$Exceptions.propertyValueCanNotBeNull(Property.java:143)
     at 
org.apache.tinkerpop.gremlin.structure.util.ElementHelper.validateProperty(ElementHelper.java:97)
     at 
org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex.property(TinkerVertex.java:87)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.lambda$getOrCreate$2(SubgraphStep.java:119)
     at java.util.Iterator.forEachRemaining(Iterator.java:116)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.getOrCreate(SubgraphStep.java:117)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.addEdgeToSubgraph(SubgraphStep.java:135)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.sideEffect(SubgraphStep.java:80)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep.processNextStart(SideEffectStep.java:39)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:48)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processAllStarts(NoOpBarrierStep.java:66)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processNextStart(NoOpBarrierStep.java:55)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:48)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep.processNextStart(SideEffectStep.java:38)
     at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)

[jira] [Created] (TINKERPOP-2109) gremlin subgraph step fail when vertices contains properties with null values

2018-12-03 Thread Bruno Supiot (JIRA)
Bruno Supiot created TINKERPOP-2109:
---

 Summary: gremlin subgraph step fail when vertices contains 
properties with null values
 Key: TINKERPOP-2109
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2109
 Project: TinkerPop
  Issue Type: Bug
  Components: tinkergraph
Affects Versions: 3.3.4
Reporter: Bruno Supiot


We are currently using OrientDB as graph database backend. OrientDB allows 
properties with null values. The orientdb database is requested with 
Grooy/Gremlin request.

When we are requesting for a 'subgraph' step (which use the tinkergraph on 
memory database for creating the subgraph), an exception is thrown when the 
vertex of Orientdb contains properties with null values:

Part of the exception trace:

Caused by: 
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error 
on execution of the GREMLIN script
    DB name="connectitdb"
    at 
org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:78)
    at 
org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:54)
    at 
com.activus.connectit.storage.service.graph.TinkerpopGraphService.executeGroovyGremlinScript(TinkerpopGraphService.java:149)
    ... 105 common frames omitted
Caused by: javax.script.ScriptException: javax.script.ScriptException: 
java.lang.IllegalArgumentException: Property value can not be null
    at 
org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:406)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
    at 
org.apache.tinkerpop.gremlin.orientdb.executor.StorageGremlinExecutor.executeGremlinNative(StorageGremlinExecutor.java:72)
    ... 107 common frames omitted
Caused by: javax.script.ScriptException: java.lang.IllegalArgumentException: 
Property value can not be null
    at 
org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:722)
    at 
org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:404)
    ... 109 common frames omitted

Caused by: java.lang.IllegalArgumentException: Property value can not be null
    at 
org.apache.tinkerpop.gremlin.structure.Property$Exceptions.propertyValueCanNotBeNull(Property.java:143)
    at 
org.apache.tinkerpop.gremlin.structure.util.ElementHelper.validateProperty(ElementHelper.java:97)
    at 
org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex.property(TinkerVertex.java:87)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.lambda$getOrCreate$2(SubgraphStep.java:119)
    at java.util.Iterator.forEachRemaining(Iterator.java:116)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.getOrCreate(SubgraphStep.java:117)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.addEdgeToSubgraph(SubgraphStep.java:135)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep.sideEffect(SubgraphStep.java:80)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep.processNextStart(SideEffectStep.java:39)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:48)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:42)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processAllStarts(NoOpBarrierStep.java:66)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processNextStart(NoOpBarrierStep.java:55)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:48)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
    at 
org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
    at 
org.apache.tinkerpop.gremlin.process.traversal.s

[jira] [Commented] (TINKERPOP-2100) coalesce() creating unexpected results when used with order()

2018-12-03 Thread ASF GitHub Bot (JIRA)


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

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

asfgit closed pull request #1003: TINKERPOP-2100 coalesce() creating unexpected 
results when used with order()
URL: https://github.com/apache/tinkerpop/pull/1003
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> coalesce() creating unexpected results when used with order()
> -
>
> Key: TINKERPOP-2100
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2100
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.3.4
>Reporter: stephen mallette
>Assignee: Daniel Kuppitz
>Priority: Major
>
> Bug was originally reported here:
> https://stackoverflow.com/q/53482054/1831717
> demonstrated as:
> {code}
> gremlin> g.V().
> ..1>   hasLabel("person").
> ..2>   out("created").
> ..3>   order().by("name").
> ..4>   coalesce(values("name").fold(), constant("x")).
> ..5>   fold()
> ==>[[lop,lop,lop],[lop,lop,lop],[lop,lop,lop],[ripple]]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [tinkerpop] dkuppitz commented on issue #1007: TINKERPOP-2018 Generate API docs for .NET

2018-12-03 Thread GitHub
VOTE +1

[ Full content available at: https://github.com/apache/tinkerpop/pull/1007 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[GitHub] [tinkerpop] dkuppitz commented on issue #1006: TINKERPOP-2103 Remove deprecated submit() on RemoteConnection

2018-12-03 Thread GitHub
VOTE +1

[ Full content available at: https://github.com/apache/tinkerpop/pull/1006 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[jira] [Closed] (TINKERPOP-2100) coalesce() creating unexpected results when used with order()

2018-12-03 Thread Daniel Kuppitz (JIRA)


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

Daniel Kuppitz closed TINKERPOP-2100.
-
   Resolution: Fixed
Fix Version/s: 3.3.5
   3.4.0

> coalesce() creating unexpected results when used with order()
> -
>
> Key: TINKERPOP-2100
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2100
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.3.4
>Reporter: stephen mallette
>Assignee: Daniel Kuppitz
>Priority: Major
> Fix For: 3.4.0, 3.3.5
>
>
> Bug was originally reported here:
> https://stackoverflow.com/q/53482054/1831717
> demonstrated as:
> {code}
> gremlin> g.V().
> ..1>   hasLabel("person").
> ..2>   out("created").
> ..3>   order().by("name").
> ..4>   coalesce(values("name").fold(), constant("x")).
> ..5>   fold()
> ==>[[lop,lop,lop],[lop,lop,lop],[lop,lop,lop],[ripple]]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [tinkerpop] asfgit closed pull request #1003: TINKERPOP-2100 coalesce() creating unexpected results when used with order()

2018-12-03 Thread GitHub
[ pull request closed by asfgit ]

[ Full content available at: https://github.com/apache/tinkerpop/pull/1003 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[GitHub] [tinkerpop] dkuppitz commented on issue #1002: TINKERPOP-2101 Upgrade Spark to Spark 2.4

2018-12-03 Thread GitHub
VOTE +1

[ Full content available at: https://github.com/apache/tinkerpop/pull/1002 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[GitHub] [tinkerpop] spmallette commented on issue #1009: TINKERPOP-2106 throw TimeoutException instead of TraversalInterruptedException

2018-12-03 Thread GitHub
i was a bit hesitant about this one at first, but perhaps this makes sense. 
looking at the `TraversalOpProcessor`, it seems to have similar behavior 
converting the `TraversalInterruptionException` to a simple `TimeoutException`. 
 

All tests pass with `docker/build.sh -t -i`

VOTE +1

[ Full content available at: https://github.com/apache/tinkerpop/pull/1009 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org


[jira] [Work started] (TINKERPOP-2075) Introduce DetachmentStrategy

2018-12-03 Thread stephen mallette (JIRA)


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

Work on TINKERPOP-2075 started by stephen mallette.
---
> Introduce DetachmentStrategy
> 
>
> Key: TINKERPOP-2075
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2075
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
>
> Introduce {{DetachmentStrategy}} to auto detach graph elements. We would 
> probably have option to configure the strategy to use "detached" or 
> "reference" elements with the default being "reference" (i.e. no properties). 
>  This will start to help to align all usage of Gremlin around "reference" 
> elements no matter how users connect (i.e. GLVs, embedded, Gremlin Server, 
> etc.). 
> Initially, this issue should just be about implementing the strategy and 
> getting it into play with the rest of the things it relates to. Not sure what 
> it does to {{HaltedTraverserStrategy}} if anything at this point or the 
> various detachment methods that already exist. 
> Once the feature is in place we can decide how it will be implemented by 
> default in the framework - see the linked DISCUSS thread for more information.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (TINKERPOP-2075) Introduce ReferenceStrategy

2018-12-03 Thread stephen mallette (JIRA)


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

stephen mallette updated TINKERPOP-2075:

Description: Introduce {{ReferenceElementStrategy}} to auto detach graph 
elements as references and configure it for default graphs in Gremlin Server. 
This will start to help to align all usage of Gremlin around "reference" 
elements no matter how users connect (i.e. GLVs, embedded, Gremlin Server, 
etc.).   (was: Introduce {{DetachmentStrategy}} to auto detach graph elements. 
We would probably have option to configure the strategy to use "detached" or 
"reference" elements with the default being "reference" (i.e. no properties).  
This will start to help to align all usage of Gremlin around "reference" 
elements no matter how users connect (i.e. GLVs, embedded, Gremlin Server, 
etc.). 

Initially, this issue should just be about implementing the strategy and 
getting it into play with the rest of the things it relates to. Not sure what 
it does to {{HaltedTraverserStrategy}} if anything at this point or the various 
detachment methods that already exist. 

Once the feature is in place we can decide how it will be implemented by 
default in the framework - see the linked DISCUSS thread for more information.)

> Introduce ReferenceStrategy
> ---
>
> Key: TINKERPOP-2075
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2075
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
>
> Introduce {{ReferenceElementStrategy}} to auto detach graph elements as 
> references and configure it for default graphs in Gremlin Server. This will 
> start to help to align all usage of Gremlin around "reference" elements no 
> matter how users connect (i.e. GLVs, embedded, Gremlin Server, etc.). 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (TINKERPOP-2075) Introduce ReferenceElementStrategy

2018-12-03 Thread stephen mallette (JIRA)


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

stephen mallette updated TINKERPOP-2075:

Summary: Introduce ReferenceElementStrategy  (was: Introduce 
ReferenceStrategy)

> Introduce ReferenceElementStrategy
> --
>
> Key: TINKERPOP-2075
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2075
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
>
> Introduce {{ReferenceElementStrategy}} to auto detach graph elements as 
> references and configure it for default graphs in Gremlin Server. This will 
> start to help to align all usage of Gremlin around "reference" elements no 
> matter how users connect (i.e. GLVs, embedded, Gremlin Server, etc.). 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (TINKERPOP-2075) Introduce ReferenceStrategy

2018-12-03 Thread stephen mallette (JIRA)


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

stephen mallette updated TINKERPOP-2075:

Summary: Introduce ReferenceStrategy  (was: Introduce DetachmentStrategy)

> Introduce ReferenceStrategy
> ---
>
> Key: TINKERPOP-2075
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2075
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
>
> Introduce {{DetachmentStrategy}} to auto detach graph elements. We would 
> probably have option to configure the strategy to use "detached" or 
> "reference" elements with the default being "reference" (i.e. no properties). 
>  This will start to help to align all usage of Gremlin around "reference" 
> elements no matter how users connect (i.e. GLVs, embedded, Gremlin Server, 
> etc.). 
> Initially, this issue should just be about implementing the strategy and 
> getting it into play with the rest of the things it relates to. Not sure what 
> it does to {{HaltedTraverserStrategy}} if anything at this point or the 
> various detachment methods that already exist. 
> Once the feature is in place we can decide how it will be implemented by 
> default in the framework - see the linked DISCUSS thread for more information.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-2105) Gremlin-Python connection not returned back to the pool on exception from gremlin server

2018-12-03 Thread stephen mallette (JIRA)


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

stephen mallette commented on TINKERPOP-2105:
-

I'm not sure. Can you write a test to validate that there was failing behavior 
and then show that the failure is resolved with this change?

> Gremlin-Python connection not returned back to the pool on exception from 
> gremlin server
> 
>
> Key: TINKERPOP-2105
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2105
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver, python
>Reporter: Kunal
>Priority: Major
> Attachments: issue.py
>
>
> The is an issue with the gremlin-python driver where for requests that return 
> an exception from the gremlin server result in the connection not being 
> returned to the pool. I have a reproducer and have attached the code to this 
> issue as issue.py. 
> The root cause seems to be in the error handling logic in connection.py refer 
> to 
> [https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/driver/connection.py#L75-L81.]
>  In exception scenarios an exception is thrown on line 77 which cause line 81 
> to be not executed.
> The result of this is if we use a singleton connection (as in the attached 
> reproducer) on the client side with default pool size of 4 then the client 
> becomes unresponsive after 4 requests that result in server throwing an 
> exception.
> This issue is reproducible with tinkergraph reference implementation as well.
>  
> I tried a workaround by changing connection.py locally which did work for me 
> but not sure if that would be the ideal fix. Basically in the _receive() 
> function in connection.py I added a try finally and call the 
> self._pool.put_nowait(self) in the finally block
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)