[GitHub] tinkerpop pull request #451: TINKERPOP-1458 Gremlin Server doesn't return co...

2016-10-06 Thread davebshow
Github user davebshow commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/451#discussion_r82311244
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
 ---
@@ -39,12 +40,14 @@
 public class DriverRemoteTraversalSideEffects extends 
AbstractRemoteTraversalSideEffects {
 
 private final Client client;
-private Set keys = null;
+private Set keys = Collections.emptySet();
 private final UUID serverSideEffect;
 private final Host host;
 
 private final Map sideEffects = new HashMap<>();
 
+private boolean closed = false;
--- End diff --

How would you remedy this? Is it worth using `AtomicBoolean`?


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


[jira] [Closed] (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors

2016-10-06 Thread Daniel Kuppitz (JIRA)

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

Daniel Kuppitz closed TINKERPOP-1158.
-
   Resolution: Fixed
Fix Version/s: 3.2.3
   3.1.5

> gremlin.sh -v emits log4j initialization errors
> ---
>
> Key: TINKERPOP-1158
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1158
> Project: TinkerPop
>  Issue Type: Bug
>  Components: console
>Affects Versions: 3.1.1-incubating
>Reporter: Ariel Weisberg
>Assignee: Daniel Kuppitz
>Priority: Trivial
> Fix For: 3.1.5, 3.2.3
>
>
> I get a bunch of unrelated noise from log4j when I run hash 
> [c0b79c5|https://github.com/apache/incubator-tinkerpop/tree/c0b79c5c65db6424407ca00144be5167052c6c6b].
> I am running from the bin directory of the repository after {{mvn clean 
> install}}.
> {noformat}
> $ ./gremlin.sh -v
>  log4j:WARN No appenders could be found for logger 
> (com.jcabi.manifests.Manifests).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> gremlin 3.2.0-SNAPSHOT
> {noformat}



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


[jira] [Commented] (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors

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

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

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

Github user asfgit closed the pull request at:

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


> gremlin.sh -v emits log4j initialization errors
> ---
>
> Key: TINKERPOP-1158
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1158
> Project: TinkerPop
>  Issue Type: Bug
>  Components: console
>Affects Versions: 3.1.1-incubating
>Reporter: Ariel Weisberg
>Assignee: Daniel Kuppitz
>Priority: Trivial
>
> I get a bunch of unrelated noise from log4j when I run hash 
> [c0b79c5|https://github.com/apache/incubator-tinkerpop/tree/c0b79c5c65db6424407ca00144be5167052c6c6b].
> I am running from the bin directory of the repository after {{mvn clean 
> install}}.
> {noformat}
> $ ./gremlin.sh -v
>  log4j:WARN No appenders could be found for logger 
> (com.jcabi.manifests.Manifests).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> gremlin 3.2.0-SNAPSHOT
> {noformat}



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


[jira] [Closed] (TINKERPOP-1488) Make LazyBarrierStrategy part of the default TraversalStrategies

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

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

Marko A. Rodriguez closed TINKERPOP-1488.
-
   Resolution: Fixed
Fix Version/s: 3.2.3

> Make LazyBarrierStrategy part of the default TraversalStrategies
> 
>
> Key: TINKERPOP-1488
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1488
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>Assignee: Marko A. Rodriguez
>  Labels: breaking
> Fix For: 3.2.3
>
>
> We have had {{LazyBarrierStrategy}} in TinkerPop since perhaps the 3.0 
> release. However, it was not part of the default strategies. Moreover, its a 
> finalization strategy when it should be an {{OptimizationStrategy}}.



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


[GitHub] tinkerpop issue #444: TINKERPOP-1158 gremlin.sh -v emits log4j initializatio...

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

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


[GitHub] tinkerpop issue #448: Python glv graphson update

2016-10-06 Thread aholmberg
Github user aholmberg commented on the issue:

https://github.com/apache/tinkerpop/pull/448
  
I'm ambivalent on that. I just noticed unittest was present, and the bare 
assertions were not very informative. I can take that commit out if you think 
it's not worth it now.


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


[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...

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

https://github.com/apache/tinkerpop/pull/449
  
All tests pass with `docker/build.sh -t -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.
---


[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...

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

https://github.com/apache/tinkerpop/pull/449
  
@spmallette -- good call. I added back `finalization.LazyBarrierStrategy` 
and @Deprecated it.


---
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-1488) Make LazyBarrierStrategy part of the default TraversalStrategies

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

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

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

Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/449
  
@spmallette -- good call. I added back `finalization.LazyBarrierStrategy` 
and @Deprecated it.


> Make LazyBarrierStrategy part of the default TraversalStrategies
> 
>
> Key: TINKERPOP-1488
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1488
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>  Labels: breaking
>
> We have had {{LazyBarrierStrategy}} in TinkerPop since perhaps the 3.0 
> release. However, it was not part of the default strategies. Moreover, its a 
> finalization strategy when it should be an {{OptimizationStrategy}}.



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


[jira] [Commented] (TINKERPOP-1158) gremlin.sh -v emits log4j initialization errors

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

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

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

Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/444
  
I believe I'm a VOTE +0 as I use `bin/gremlin.sh` all the time. 


> gremlin.sh -v emits log4j initialization errors
> ---
>
> Key: TINKERPOP-1158
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1158
> Project: TinkerPop
>  Issue Type: Bug
>  Components: console
>Affects Versions: 3.1.1-incubating
>Reporter: Ariel Weisberg
>Assignee: Daniel Kuppitz
>Priority: Trivial
>
> I get a bunch of unrelated noise from log4j when I run hash 
> [c0b79c5|https://github.com/apache/incubator-tinkerpop/tree/c0b79c5c65db6424407ca00144be5167052c6c6b].
> I am running from the bin directory of the repository after {{mvn clean 
> install}}.
> {noformat}
> $ ./gremlin.sh -v
>  log4j:WARN No appenders could be found for logger 
> (com.jcabi.manifests.Manifests).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> gremlin 3.2.0-SNAPSHOT
> {noformat}



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


[jira] [Closed] (TINKERPOP-1436) GraphSON 2.0 documentation on types

2016-10-06 Thread stephen mallette (JIRA)

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

stephen mallette closed TINKERPOP-1436.
---
Resolution: Duplicate
  Assignee: stephen mallette

> GraphSON 2.0 documentation on types
> ---
>
> Key: TINKERPOP-1436
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1436
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: documentation
>Affects Versions: 3.2.2
>Reporter: stephen mallette
>Assignee: stephen mallette
>
> There should be specific documentation on GraphSON 2.0 types (e.g. Bytecode, 
> Vertex, Edge, etc) with JSON examples. Perhaps it should be a separate 
> document like {{dev/graphson}} or a more general document on raw details of 
> IO in general {{dev/io}}. In a sense this topic is sorta low-level and really 
> mostly important to driver/GLV developers so having the docs in {{dev/}} 
> seems to make sense and then we just provide a link from reference docs and 
> other places where we reference GraphSON.



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


[jira] [Commented] (TINKERPOP-1458) Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" op

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

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

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

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82243790
  
--- Diff: 
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffectsTest.java
 ---
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.remote;
+
+import org.apache.tinkerpop.gremlin.driver.AbstractResultQueueTest;
+import org.apache.tinkerpop.gremlin.driver.Client;
+import org.apache.tinkerpop.gremlin.driver.ResultSet;
+import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
+import org.junit.Test;
+
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class DriverRemoteTraversalSideEffectsTest extends 
AbstractResultQueueTest {
--- End diff --

ah - sorry - i didn't notice that.


> Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" 
> op
> 
>
> Key: TINKERPOP-1458
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1458
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.2.2
>Reporter: David M. Brown
>Assignee: David M. Brown
> Fix For: 3.2.3
>
>
> Gremlin Server should return some sort of success message to driver upon 
> invalidating the side effect cache for a traversal.



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


[GitHub] tinkerpop pull request #451: TINKERPOP-1458 Gremlin Server doesn't return co...

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82243790
  
--- Diff: 
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffectsTest.java
 ---
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.remote;
+
+import org.apache.tinkerpop.gremlin.driver.AbstractResultQueueTest;
+import org.apache.tinkerpop.gremlin.driver.Client;
+import org.apache.tinkerpop.gremlin.driver.ResultSet;
+import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
+import org.junit.Test;
+
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class DriverRemoteTraversalSideEffectsTest extends 
AbstractResultQueueTest {
--- End diff --

ah - sorry - i didn't notice that.


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


[GitHub] tinkerpop issue #448: Python glv graphson update

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

https://github.com/apache/tinkerpop/pull/448
  
This looks good. However, can you please rebase with `master/` as there 
have been some changes to `graphson.py`. Also, if there is anything that needs 
to be added to `gremlin-variants.asciidoc` about registering 
serializers/deserializers, please add. Thanks.

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


[GitHub] tinkerpop pull request #447: TINKERPOP-1455: Provide String-based withStrate...

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

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


---
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-1455) Provide String-based withStrategy()/withoutStrategy() for language variant usage

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

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

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

Github user asfgit closed the pull request at:

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


> Provide String-based withStrategy()/withoutStrategy() for language variant 
> usage
> 
>
> Key: TINKERPOP-1455
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1455
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language-variant, process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>Assignee: Marko A. Rodriguez
>
> Right now {{withStrategies()}} is not supported by Gremlin-Python. Why? 
> Because strategies are created via Java and thus you can't do stuff like:
> {code}
> g.withStrategies(SubgraphStrategy.build()...create())
> {code}
> Now, we have strategies that we have made "native" to 
> {{GraphTraversalSource}} by way of {{withXXX}}. For example: 
> {{withSideEffect()}}, {{withSack()}}, {{withRemote()}}, {{withPath()}}, etc.
> In order to generally support any strategy created by a user for use from a 
> language variant, we should support lambda based strategies. E.g.:
> {code}
> g.withStrategies(lambda : "SubgraphStrategy.build()...create()")
> {code}
> Like any other lambda, it is executed server side using the respective 
> {{ScriptEngine}}.
> Next, {{withoutStrategies()}} should support {{String...}} so you can do:
> {code}
> g.withoutStrategies("com.stuff.MyStrategy", "com.stuff.MyOtherStrategy")
> {code}
> ..instead of having to pass in the {{Class}} object.



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


[jira] [Commented] (TINKERPOP-1458) Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" op

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

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

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

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82239737
  
--- Diff: 
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffectsTest.java
 ---
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.remote;
+
+import org.apache.tinkerpop.gremlin.driver.AbstractResultQueueTest;
+import org.apache.tinkerpop.gremlin.driver.Client;
+import org.apache.tinkerpop.gremlin.driver.ResultSet;
+import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
+import org.junit.Test;
+
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class DriverRemoteTraversalSideEffectsTest extends 
AbstractResultQueueTest {
--- End diff --

Well, I did add one test for `get()` for before and after `close()`: 
https://github.com/apache/tinkerpop/blob/TINKERPOP-1458/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffectsTest.java#L67-L84
 


> Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" 
> op
> 
>
> Key: TINKERPOP-1458
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1458
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.2.2
>Reporter: David M. Brown
>Assignee: David M. Brown
> Fix For: 3.2.3
>
>
> Gremlin Server should return some sort of success message to driver upon 
> invalidating the side effect cache for a traversal.



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


[GitHub] tinkerpop pull request #451: TINKERPOP-1458 Gremlin Server doesn't return co...

2016-10-06 Thread davebshow
Github user davebshow commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/451#discussion_r82239737
  
--- Diff: 
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffectsTest.java
 ---
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.remote;
+
+import org.apache.tinkerpop.gremlin.driver.AbstractResultQueueTest;
+import org.apache.tinkerpop.gremlin.driver.Client;
+import org.apache.tinkerpop.gremlin.driver.ResultSet;
+import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalSideEffects;
+import org.junit.Test;
+
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class DriverRemoteTraversalSideEffectsTest extends 
AbstractResultQueueTest {
--- End diff --

Well, I did add one test for `get()` for before and after `close()`: 
https://github.com/apache/tinkerpop/blob/TINKERPOP-1458/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffectsTest.java#L67-L84
 


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


[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...

2016-10-06 Thread twilmes
Github user twilmes commented on the issue:

https://github.com/apache/tinkerpop/pull/449
  
The code and tests look good to me.  `mvn clean install` also ran without 
issue.

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-1433) Add steps to dev docs to help committers get their keys in order

2016-10-06 Thread Ted Wilmes (JIRA)

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

Ted Wilmes commented on TINKERPOP-1433:
---

Yes, I need to do this and then incorporate a few other things that I ran into 
last release.  I'll dust the cobwebs off during the prep for 3.1.5.

> Add steps to dev docs to help committers get their keys in order
> 
>
> Key: TINKERPOP-1433
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1433
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: documentation
>Affects Versions: 3.1.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> I'll add some steps to help committers navigate the Apache PGP docs and will 
> include any TinkerPop specific steps (update validate-distribution.sh).



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


[jira] [Commented] (TINKERPOP-1044) ResponseMessage should contain server-side exception name.

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

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

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

Github user vrkrishn commented on the issue:

https://github.com/apache/tinkerpop/pull/440
  
Would it be possible to push this change then and add the other 
functionality as a different ticket?


> ResponseMessage should contain server-side exception name.
> --
>
> Key: TINKERPOP-1044
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1044
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.1.0-incubating
>Reporter: Bob Briody
>Priority: Minor
>
> When an exception occurs during execution by gremlin server, the 
> ResponseMessage currently contains the Exception message, but it would also 
> be helpful to include the Exception class name.



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


[GitHub] tinkerpop issue #440: TINKERPOP-1044: Gremlin server REST endpoint - Add Exc...

2016-10-06 Thread vrkrishn
Github user vrkrishn commented on the issue:

https://github.com/apache/tinkerpop/pull/440
  
Would it be possible to push this change then and add the other 
functionality as a different ticket?


---
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-1433) Add steps to dev docs to help committers get their keys in order

2016-10-06 Thread stephen mallette (JIRA)

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

stephen mallette commented on TINKERPOP-1433:
-

Didn't notice this issue before today - good idea [~twilmes] - any chance you 
will have some time to do this next week? Those docs might make it easier for 
someone else to volunteer on future release manager jobs. I swear that's the 
most confusing part of release. If I had to do it again on a different system, 
I'm not so sure I would even know what to do.

> Add steps to dev docs to help committers get their keys in order
> 
>
> Key: TINKERPOP-1433
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1433
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: documentation
>Affects Versions: 3.1.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> I'll add some steps to help committers navigate the Apache PGP docs and will 
> include any TinkerPop specific steps (update validate-distribution.sh).



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


[GitHub] tinkerpop issue #440: TINKERPOP-1044: Gremlin server REST endpoint - Add Exc...

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

https://github.com/apache/tinkerpop/pull/440
  
We intend to freeze the code base for release of 3.2.3 (and 3.1.5) in a 
couple of days. If you'd like to see this merged in time for 3.2.3, we'd need 
to have your changes pretty soon for review. No pressure, of courseI just 
wanted to inform you of our release schedule in case you really needed this 
change in an official packaged release.


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


[GitHub] tinkerpop pull request #451: TINKERPOP-1458 Gremlin Server doesn't return co...

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82210649
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
 ---
@@ -89,9 +100,8 @@ public DriverRemoteTraversalSideEffects(final Client 
client, final UUID serverSi
 keys = 
client.submitAsync(msg).get().all().get().stream().map(r -> 
r.getString()).collect(Collectors.toSet());
 } catch (Exception ex) {
 final Throwable root = ExceptionUtils.getRootCause(ex);
-if (root.getMessage().equals("Could not find side-effects 
for " + serverSideEffect + "."))
-keys = Collections.emptySet();
-else
+final String exMsg = null == root ? "" : root.getMessage();
+if (!exMsg.equals("Could not find side-effects for " + 
serverSideEffect + "."))
--- End diff --

I know you didn't add this, but I really hate that we had to do this 
message checking - need a JIRA ticket to improve this (or perhaps a comment on 
an existing ticket regarding exceptions coming back from the server if there's 
a relevant one like that).


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


[jira] [Commented] (TINKERPOP-1458) Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" op

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

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

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

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82212090
  
--- Diff: 
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
 ---
@@ -814,18 +829,88 @@ public void 
shouldStillSupportDeprecatedRebindingsParameterOnServer() throws Exc
 
 @Test
 public void shouldSupportLambdasUsingWithRemote() throws Exception {
-final Supplier graphGetter = () -> 
server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph");
-final Configuration conf = new BaseConfiguration() {{
-setProperty(Graph.GRAPH, RemoteGraph.class.getName());
-setProperty(GREMLIN_REMOTE_CONNECTION_CLASS, 
DriverRemoteConnection.class.getName());
-
setProperty(DriverRemoteConnection.GREMLIN_REMOTE_DRIVER_SOURCENAME, "g");
-setProperty("hidden.for.testing.only", graphGetter);
-}};
-
 final Graph graph = EmptyGraph.instance();
 final GraphTraversalSource g = graph.traversal().withRemote(conf);
 g.addV("person").property("age", 20).iterate();
 g.addV("person").property("age", 10).iterate();
 assertEquals(50L, 
g.V().hasLabel("person").map(Lambda.function("it.get().value('age') + 
10")).sum().next());
 }
+
+@Test
+public void shouldGetSideEffectKeysUsingWithRemote() throws Exception {
+final Graph graph = EmptyGraph.instance();
+final GraphTraversalSource g = graph.traversal().withRemote(conf);
+g.addV("person").property("age", 20).iterate();
+g.addV("person").property("age", 10).iterate();
+final GraphTraversal traversal = 
g.V().aggregate("a").aggregate("b");
+traversal.iterate();
+final DriverRemoteTraversalSideEffects se = 
(DriverRemoteTraversalSideEffects) traversal.asAdmin().getSideEffects();
+
+// Get keys
+final Set sideEffectKeys = se.keys();
+assertEquals(2, sideEffectKeys.size());
+
+// Get side effects
+final BulkSet aSideEffects = se.get("a");
+assertThat(aSideEffects.isEmpty(), is(false));
+final BulkSet bSideEffects = se.get("b");
+assertThat(bSideEffects.isEmpty(), is(false));
+
+// Should get local keys/side effects after close
+se.close();
+
+final Set localSideEffectKeys = se.keys();
+assertEquals(2, localSideEffectKeys.size());
+
+final BulkSet localASideEffects = se.get("a");
+assertThat(localASideEffects.isEmpty(), is(false));
+
+final BulkSet localBSideEffects = se.get("b");
+assertThat(localBSideEffects.isEmpty(), is(false));
+}
+
+@Test
+public void shouldCloseSideEffectsUsingWithRemote() throws Exception {
+final Graph graph = EmptyGraph.instance();
+final GraphTraversalSource g = graph.traversal().withRemote(conf);
+g.addV("person").property("age", 20).iterate();
+g.addV("person").property("age", 10).iterate();
+final GraphTraversal traversal = 
g.V().aggregate("a").aggregate("b");
+traversal.iterate();
+final DriverRemoteTraversalSideEffects se = 
(DriverRemoteTraversalSideEffects) traversal.asAdmin().getSideEffects();
+final BulkSet sideEffects = se.get("a");
+assertThat(sideEffects.isEmpty(), is(false));
+se.close();
+
+// Can't get new side effects after close
+assertNull(se.get("b"));
+
+// Earlier keys should be cached locally
+final Set localSideEffectKeys = se.keys();
+assertEquals(1, localSideEffectKeys.size());
+final BulkSet localSideEffects = se.get("a");
+assertThat(localSideEffects.isEmpty(), is(false));
+
+// Try to get side effect from server
+final Cluster cluster = Cluster.build("localhost").create();
+final Client client = cluster.connect();
+Field field = 
DriverRemoteTraversalSideEffects.class.getDeclaredField("serverSideEffect");
--- End diff --

please `final` your `Field` and `UUID` variables. glad the reflection trick 
worked for this test.


> Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" 
> op
> 
>
> Key: TINKERPOP-1458
> URL: 

[GitHub] tinkerpop pull request #451: TINKERPOP-1458 Gremlin Server doesn't return co...

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82212090
  
--- Diff: 
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
 ---
@@ -814,18 +829,88 @@ public void 
shouldStillSupportDeprecatedRebindingsParameterOnServer() throws Exc
 
 @Test
 public void shouldSupportLambdasUsingWithRemote() throws Exception {
-final Supplier graphGetter = () -> 
server.getServerGremlinExecutor().getGraphManager().getGraphs().get("graph");
-final Configuration conf = new BaseConfiguration() {{
-setProperty(Graph.GRAPH, RemoteGraph.class.getName());
-setProperty(GREMLIN_REMOTE_CONNECTION_CLASS, 
DriverRemoteConnection.class.getName());
-
setProperty(DriverRemoteConnection.GREMLIN_REMOTE_DRIVER_SOURCENAME, "g");
-setProperty("hidden.for.testing.only", graphGetter);
-}};
-
 final Graph graph = EmptyGraph.instance();
 final GraphTraversalSource g = graph.traversal().withRemote(conf);
 g.addV("person").property("age", 20).iterate();
 g.addV("person").property("age", 10).iterate();
 assertEquals(50L, 
g.V().hasLabel("person").map(Lambda.function("it.get().value('age') + 
10")).sum().next());
 }
+
+@Test
+public void shouldGetSideEffectKeysUsingWithRemote() throws Exception {
+final Graph graph = EmptyGraph.instance();
+final GraphTraversalSource g = graph.traversal().withRemote(conf);
+g.addV("person").property("age", 20).iterate();
+g.addV("person").property("age", 10).iterate();
+final GraphTraversal traversal = 
g.V().aggregate("a").aggregate("b");
+traversal.iterate();
+final DriverRemoteTraversalSideEffects se = 
(DriverRemoteTraversalSideEffects) traversal.asAdmin().getSideEffects();
+
+// Get keys
+final Set sideEffectKeys = se.keys();
+assertEquals(2, sideEffectKeys.size());
+
+// Get side effects
+final BulkSet aSideEffects = se.get("a");
+assertThat(aSideEffects.isEmpty(), is(false));
+final BulkSet bSideEffects = se.get("b");
+assertThat(bSideEffects.isEmpty(), is(false));
+
+// Should get local keys/side effects after close
+se.close();
+
+final Set localSideEffectKeys = se.keys();
+assertEquals(2, localSideEffectKeys.size());
+
+final BulkSet localASideEffects = se.get("a");
+assertThat(localASideEffects.isEmpty(), is(false));
+
+final BulkSet localBSideEffects = se.get("b");
+assertThat(localBSideEffects.isEmpty(), is(false));
+}
+
+@Test
+public void shouldCloseSideEffectsUsingWithRemote() throws Exception {
+final Graph graph = EmptyGraph.instance();
+final GraphTraversalSource g = graph.traversal().withRemote(conf);
+g.addV("person").property("age", 20).iterate();
+g.addV("person").property("age", 10).iterate();
+final GraphTraversal traversal = 
g.V().aggregate("a").aggregate("b");
+traversal.iterate();
+final DriverRemoteTraversalSideEffects se = 
(DriverRemoteTraversalSideEffects) traversal.asAdmin().getSideEffects();
+final BulkSet sideEffects = se.get("a");
+assertThat(sideEffects.isEmpty(), is(false));
+se.close();
+
+// Can't get new side effects after close
+assertNull(se.get("b"));
+
+// Earlier keys should be cached locally
+final Set localSideEffectKeys = se.keys();
+assertEquals(1, localSideEffectKeys.size());
+final BulkSet localSideEffects = se.get("a");
+assertThat(localSideEffects.isEmpty(), is(false));
+
+// Try to get side effect from server
+final Cluster cluster = Cluster.build("localhost").create();
+final Client client = cluster.connect();
+Field field = 
DriverRemoteTraversalSideEffects.class.getDeclaredField("serverSideEffect");
--- End diff --

please `final` your `Field` and `UUID` variables. glad the reflection trick 
worked for this test.


---
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-1458) Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" op

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

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

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

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82211073
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
 ---
@@ -54,22 +57,30 @@ public DriverRemoteTraversalSideEffects(final Client 
client, final UUID serverSi
 @Override
 public  V get(final String key) throws IllegalArgumentException {
 if (!sideEffects.containsKey(key)) {
-// specify the ARGS_HOST so that the LoadBalancingStrategy is 
subverted and the connection is forced
-// from the specified host (i.e. the host from the previous 
request as that host will hold the side-effects)
-final RequestMessage msg = 
RequestMessage.build(Tokens.OPS_GATHER)
-.addArg(Tokens.ARGS_SIDE_EFFECT, serverSideEffect)
-.addArg(Tokens.ARGS_SIDE_EFFECT_KEY, key)
-.addArg(Tokens.ARGS_HOST, host)
-.processor("traversal").create();
-try {
-final Result result = client.submitAsync(msg).get().one();
-sideEffects.put(key, null == result ? null : 
result.getObject());
-} catch (Exception ex) {
-final Throwable root = ExceptionUtils.getRootCause(ex);
-if (root.getMessage().equals("Could not find side-effects 
for " + serverSideEffect + "."))
-sideEffects.put(key, null);
-else
-throw new RuntimeException("Could not get keys", root);
+if (!closed) {
+// specify the ARGS_HOST so that the LoadBalancingStrategy 
is subverted and the connection is forced
+// from the specified host (i.e. the host from the 
previous request as that host will hold the side-effects)
+final RequestMessage msg = 
RequestMessage.build(Tokens.OPS_GATHER)
+.addArg(Tokens.ARGS_SIDE_EFFECT, serverSideEffect)
+.addArg(Tokens.ARGS_SIDE_EFFECT_KEY, key)
+.addArg(Tokens.ARGS_HOST, host)
+.processor("traversal").create();
+try {
+final Result result = 
client.submitAsync(msg).get().one();
+sideEffects.put(key, null == result ? null : 
result.getObject());
+if (keys.isEmpty())
--- End diff --

Not sure if you should check `isEmpty()`.  Maybe better to check:

```java
if (keys == Collections.emptySet())
```

That's really when you want to new up a fresh `HashSet`, not just when its 
empty.


> Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" 
> op
> 
>
> Key: TINKERPOP-1458
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1458
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.2.2
>Reporter: David M. Brown
>Assignee: David M. Brown
> Fix For: 3.2.3
>
>
> Gremlin Server should return some sort of success message to driver upon 
> invalidating the side effect cache for a traversal.



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


[GitHub] tinkerpop pull request #451: TINKERPOP-1458 Gremlin Server doesn't return co...

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82211073
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
 ---
@@ -54,22 +57,30 @@ public DriverRemoteTraversalSideEffects(final Client 
client, final UUID serverSi
 @Override
 public  V get(final String key) throws IllegalArgumentException {
 if (!sideEffects.containsKey(key)) {
-// specify the ARGS_HOST so that the LoadBalancingStrategy is 
subverted and the connection is forced
-// from the specified host (i.e. the host from the previous 
request as that host will hold the side-effects)
-final RequestMessage msg = 
RequestMessage.build(Tokens.OPS_GATHER)
-.addArg(Tokens.ARGS_SIDE_EFFECT, serverSideEffect)
-.addArg(Tokens.ARGS_SIDE_EFFECT_KEY, key)
-.addArg(Tokens.ARGS_HOST, host)
-.processor("traversal").create();
-try {
-final Result result = client.submitAsync(msg).get().one();
-sideEffects.put(key, null == result ? null : 
result.getObject());
-} catch (Exception ex) {
-final Throwable root = ExceptionUtils.getRootCause(ex);
-if (root.getMessage().equals("Could not find side-effects 
for " + serverSideEffect + "."))
-sideEffects.put(key, null);
-else
-throw new RuntimeException("Could not get keys", root);
+if (!closed) {
+// specify the ARGS_HOST so that the LoadBalancingStrategy 
is subverted and the connection is forced
+// from the specified host (i.e. the host from the 
previous request as that host will hold the side-effects)
+final RequestMessage msg = 
RequestMessage.build(Tokens.OPS_GATHER)
+.addArg(Tokens.ARGS_SIDE_EFFECT, serverSideEffect)
+.addArg(Tokens.ARGS_SIDE_EFFECT_KEY, key)
+.addArg(Tokens.ARGS_HOST, host)
+.processor("traversal").create();
+try {
+final Result result = 
client.submitAsync(msg).get().one();
+sideEffects.put(key, null == result ? null : 
result.getObject());
+if (keys.isEmpty())
--- End diff --

Not sure if you should check `isEmpty()`.  Maybe better to check:

```java
if (keys == Collections.emptySet())
```

That's really when you want to new up a fresh `HashSet`, not just when its 
empty.


---
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-1458) Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" op

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

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

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

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82210649
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
 ---
@@ -89,9 +100,8 @@ public DriverRemoteTraversalSideEffects(final Client 
client, final UUID serverSi
 keys = 
client.submitAsync(msg).get().all().get().stream().map(r -> 
r.getString()).collect(Collectors.toSet());
 } catch (Exception ex) {
 final Throwable root = ExceptionUtils.getRootCause(ex);
-if (root.getMessage().equals("Could not find side-effects 
for " + serverSideEffect + "."))
-keys = Collections.emptySet();
-else
+final String exMsg = null == root ? "" : root.getMessage();
+if (!exMsg.equals("Could not find side-effects for " + 
serverSideEffect + "."))
--- End diff --

I know you didn't add this, but I really hate that we had to do this 
message checking - need a JIRA ticket to improve this (or perhaps a comment on 
an existing ticket regarding exceptions coming back from the server if there's 
a relevant one like that).


> Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close" 
> op
> 
>
> Key: TINKERPOP-1458
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1458
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.2.2
>Reporter: David M. Brown
>Assignee: David M. Brown
> Fix For: 3.2.3
>
>
> Gremlin Server should return some sort of success message to driver upon 
> invalidating the side effect cache for a traversal.



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


[GitHub] tinkerpop pull request #451: TINKERPOP-1458 Gremlin Server doesn't return co...

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

https://github.com/apache/tinkerpop/pull/451#discussion_r82210120
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
 ---
@@ -89,9 +100,8 @@ public DriverRemoteTraversalSideEffects(final Client 
client, final UUID serverSi
 keys = 
client.submitAsync(msg).get().all().get().stream().map(r -> 
r.getString()).collect(Collectors.toSet());
--- End diff --

At first, I didn't like that this because it replaced the whole `Set` - if 
you'd called `get()` first then this the set would get re-initialized when it 
already had keys in it. But I suppose that's not really a problem. If you don't 
do that then you have to check if the `Set` was initialized or not and if not 
new one up:

```java
if (keys == Collections.emptySet())
  keys = new HashSet<>();

client.submitAsync(msg).get().all().get().forEach(r -> 
keys.add(r.getString())


A tad nicer because it gets rid of `stream()`i dunno either way is fine 
i guess.



---
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-1489) Provide a Javascript Gremlin Language Variant

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

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

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

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

https://github.com/apache/tinkerpop/pull/450#discussion_r82168010
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

:) mocha is nice: https://mochajs.org/


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language-variant
>Reporter: Jorge Bay
>
> It would be nice to have a Javascript Gremlin Language Variant that could 
> work with any ES5 runtime, specially the ones that support 
> [CommonJs|http://requirejs.org/docs/commonjs.html], like Node.js.
> Nashorn, the engine shipped with JDK 8+, does not implement CommonJs but 
> provides [additional 
> extensions|https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions] 
> making modular JavaScript possible. Nashorn should be supported in order to 
> run glv tests under the same infrastructure (JDK8).



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


[GitHub] tinkerpop pull request #450: TINKERPOP-1489 Javascript GLV

2016-10-06 Thread jorgebay
Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/450#discussion_r82168010
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

:) mocha is nice: https://mochajs.org/


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


[GitHub] tinkerpop pull request #450: TINKERPOP-1489 Javascript GLV

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

https://github.com/apache/tinkerpop/pull/450#discussion_r82167244
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

I guess `jjs` wouldn't be the standard "test runner" if this were a 
standalone javascript project. What would be the popular choice for a test 
framework in javascript these days? Do any of those produce xunit style output?


---
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-1489) Provide a Javascript Gremlin Language Variant

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

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

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

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

https://github.com/apache/tinkerpop/pull/450#discussion_r82163673
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

It uses JDK `jjs` tool to run the test contained in the 3 test files below 
(see `arguments`).
Currently it does not produce any output if succeeds, but it fails the 
build if any test fail with the stack trace and error. 


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language-variant
>Reporter: Jorge Bay
>
> It would be nice to have a Javascript Gremlin Language Variant that could 
> work with any ES5 runtime, specially the ones that support 
> [CommonJs|http://requirejs.org/docs/commonjs.html], like Node.js.
> Nashorn, the engine shipped with JDK 8+, does not implement CommonJs but 
> provides [additional 
> extensions|https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions] 
> making modular JavaScript possible. Nashorn should be supported in order to 
> run glv tests under the same infrastructure (JDK8).



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


[GitHub] tinkerpop pull request #450: TINKERPOP-1489 Javascript GLV

2016-10-06 Thread jorgebay
Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/450#discussion_r82163673
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

It uses JDK `jjs` tool to run the test contained in the 3 test files below 
(see `arguments`).
Currently it does not produce any output if succeeds, but it fails the 
build if any test fail with the stack trace and error. 


---
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-1488) Make LazyBarrierStrategy part of the default TraversalStrategies

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

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/449
  
This is a breaking change in the sense as the package name changed. I doubt 
it should break most users, but a breaking change nonetheless. I think it would 
have been better to deprecate it where it was and copy/paste to the new package 
There would be two classes that did the same thing, but it would all happen 
without a break. Then we just delete the deprecated one for 3.3.0.


> Make LazyBarrierStrategy part of the default TraversalStrategies
> 
>
> Key: TINKERPOP-1488
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1488
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.2.2
>Reporter: Marko A. Rodriguez
>  Labels: breaking
>
> We have had {{LazyBarrierStrategy}} in TinkerPop since perhaps the 3.0 
> release. However, it was not part of the default strategies. Moreover, its a 
> finalization strategy when it should be an {{OptimizationStrategy}}.



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


[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...

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

https://github.com/apache/tinkerpop/pull/449
  
This is a breaking change in the sense as the package name changed. I doubt 
it should break most users, but a breaking change nonetheless. I think it would 
have been better to deprecate it where it was and copy/paste to the new package 
There would be two classes that did the same thing, but it would all happen 
without a break. Then we just delete the deprecated one for 3.3.0.


---
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-1489) Provide a Javascript Gremlin Language Variant

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

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

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

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

https://github.com/apache/tinkerpop/pull/450#discussion_r82161973
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

@jorgebay can you explain the nature of this test execution? Does maven 
fail the build if these test fail? what kind of output does it produce? 


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language-variant
>Reporter: Jorge Bay
>
> It would be nice to have a Javascript Gremlin Language Variant that could 
> work with any ES5 runtime, specially the ones that support 
> [CommonJs|http://requirejs.org/docs/commonjs.html], like Node.js.
> Nashorn, the engine shipped with JDK 8+, does not implement CommonJs but 
> provides [additional 
> extensions|https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions] 
> making modular JavaScript possible. Nashorn should be supported in order to 
> run glv tests under the same infrastructure (JDK8).



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


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

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

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
1: I mentioned the difficulty of delivering a `RemoteConnection` 
implementation inside the TinkerPop repository above.
2: I commented in TINKERPOP-1490 that `async` is a reserved keyword, in 
this case, in Javascript. We could use for the Javascript GLV the method names 
that comes from the discussion in that ticket.
3: I will need more time and guidance to deliver 
GremlinJavascriptScriptEngine. Things like 
`org.apache.tinkerpop.gremlin.util['function'].Lambda.ZeroArgLambda` are 
failing under nashorn because ZeroArgLambda is being identified as a package 
but not as a class (js constructor).
4: I can send some notes and code samples your way.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: language-variant
>Reporter: Jorge Bay
>
> It would be nice to have a Javascript Gremlin Language Variant that could 
> work with any ES5 runtime, specially the ones that support 
> [CommonJs|http://requirejs.org/docs/commonjs.html], like Node.js.
> Nashorn, the engine shipped with JDK 8+, does not implement CommonJs but 
> provides [additional 
> extensions|https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions] 
> making modular JavaScript possible. Nashorn should be supported in order to 
> run glv tests under the same infrastructure (JDK8).



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


[GitHub] tinkerpop issue #450: TINKERPOP-1489 Javascript GLV

2016-10-06 Thread jorgebay
Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
1: I mentioned the difficulty of delivering a `RemoteConnection` 
implementation inside the TinkerPop repository above.
2: I commented in TINKERPOP-1490 that `async` is a reserved keyword, in 
this case, in Javascript. We could use for the Javascript GLV the method names 
that comes from the discussion in that ticket.
3: I will need more time and guidance to deliver 
GremlinJavascriptScriptEngine. Things like 
`org.apache.tinkerpop.gremlin.util['function'].Lambda.ZeroArgLambda` are 
failing under nashorn because ZeroArgLambda is being identified as a package 
but not as a class (js constructor).
4: I can send some notes and code samples your way.


---
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-10-06 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1490:
--

{{async}} is a reserved keyword in many languages:
- In C# 5+ and above.
- In [Ecmascript|https://tc39.github.io/ecmascript-asyncawait/], already 
[implemented in some of the Javascript runtimes like Microsoft 
Chakra|https://blogs.windows.com/msedgedev/2015/09/30/asynchronous-code-gets-easier-with-es2016-async-function-support-in-chakra-and-microsoft-edge/#Ld5l0SCaX4soGX2p.97].
- It looks like it's also going to be a [reserved keyword in Python 
3.7|https://www.python.org/dev/peps/pep-0530/].

Maybe something like {{toListAsync()}}, as async counterpart of {{toList()}}, 
and {{getAsync()}}, as a counterpart of {{next()}} (instead of {{nextAsync()}} 
to avoid to give the impression that is an "async iterator") ?


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