[GitHub] tinkerpop pull request #926: TINKERPOP-2031 Removed support for -i in gremli...

2018-09-13 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[jira] [Commented] (TINKERPOP-2031) Remove support for -i in gremlin-server.sh

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

Github user asfgit closed the pull request at:

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


> Remove support for -i in gremlin-server.sh
> --
>
> Key: TINKERPOP-2031
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2031
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Priority: Minor
>  Labels: breaking
> Fix For: 3.4.0
>
>
> Support for {{-i}} was maintained from earlier version of TinkerPop along 
> 3.3.3 but it should be removed for 3.4.0.



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


[jira] [Closed] (TINKERPOP-2031) Remove support for -i in gremlin-server.sh

2018-09-13 Thread stephen mallette (JIRA)


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

stephen mallette closed TINKERPOP-2031.
---
Resolution: Done
  Assignee: stephen mallette

> Remove support for -i in gremlin-server.sh
> --
>
> Key: TINKERPOP-2031
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2031
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>  Labels: breaking
> Fix For: 3.4.0
>
>
> Support for {{-i}} was maintained from earlier version of TinkerPop along 
> 3.3.3 but it should be removed for 3.4.0.



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


[jira] [Assigned] (TINKERPOP-1972) inject() tests are throwing exceptions in .NET GLV tests

2018-09-13 Thread stephen mallette (JIRA)


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

stephen mallette reassigned TINKERPOP-1972:
---

Assignee: stephen mallette  (was: Jorge Bay)

> inject() tests are throwing exceptions in .NET GLV tests
> 
>
> Key: TINKERPOP-1972
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1972
> Project: TinkerPop
>  Issue Type: Bug
>  Components: dotnet
>Affects Versions: 3.2.9
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>
> New GLV tests were added in TINKERPOP-1963 and are generating this error:
> {code}
> Failures:
> 1) g_injectX1X_chooseXisX1X__constantX10Xfold__foldX: Failed
> System.NotSupportedException: Type is not supported.
>at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* 
> pLengths, Int32* pLowerBounds)
>at System.Array.CreateInstance(Type elementType, Int32 length)
>at 
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.BuildParameters(MethodInfo
>  method, Token token, IDictionary`2& genericParameterTypes) in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
>  268
>at 
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversalFromTokens(IList`1
>  tokens, GraphTraversalSource g, IDictionary`2 contextParameterValues, String 
> traversalText) in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
>  90
>at 
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversal(String
>  traversalText, GraphTraversalSource g, IDictionary`2 contextParameterValues) 
> in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
>  62
>at 
> Gremlin.Net.IntegrationTest.Gherkin.CommonSteps.TranslateTraversal(String 
> traversalText) in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs:line
>  101
> 2) g_injectX2X_chooseXisX1X__constantX10Xfold__foldX: Failed
> System.NotSupportedException: Type is not supported.
>at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* 
> pLengths, Int32* pLowerBounds)
>at System.Array.CreateInstance(Type elementType, Int32 length)
>at 
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.BuildParameters(MethodInfo
>  method, Token token, IDictionary`2& genericParameterTypes) in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
>  268
>at 
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversalFromTokens(IList`1
>  tokens, GraphTraversalSource g, IDictionary`2 contextParameterValues, String 
> traversalText) in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
>  90
>at 
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversal(String
>  traversalText, GraphTraversalSource g, IDictionary`2 contextParameterValues) 
> in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
>  62
>at 
> Gremlin.Net.IntegrationTest.Gherkin.CommonSteps.TranslateTraversal(String 
> traversalText) in 
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs:line
>  101
> {code}



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


[GitHub] tinkerpop issue #929: TINKERPOP-2035 Pass custom headers to the websocket co...

2018-09-13 Thread jorgebay
Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/929
  
Thanks for the patch @deejvince and thanks for filing TINKERPOP-2035 
@beebs-systap !

I think its a good idea to expose ways to set the request header, as it's 
part of the [protocol](https://tools.ietf.org/html/rfc6455). You will need the 
option to set the header on all GLVs (i.e., Python, C#, Java), right?


---


[jira] [Updated] (TINKERPOP-2035) Gremlin-JavaScript: Pass custom headers to the websocket connection

2018-09-13 Thread Jorge Bay (JIRA)


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

Jorge Bay updated TINKERPOP-2035:
-
Summary: Gremlin-JavaScript: Pass custom headers to the websocket 
connection  (was: Pass custom headers to the websocket connection)

> Gremlin-JavaScript: Pass custom headers to the websocket connection
> ---
>
> Key: TINKERPOP-2035
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2035
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.3.3
>Reporter: Brad Bebee
>Priority: Major
>
> In some cases, it is required to pass extra header information to the Gremlin 
> server to successfully make a connection. This ticket is to add the feature 
> to enable users to optionally pass headers via the JavaScript client when 
> connecting to a Gremlin Server.
> This was originally noted when connecting to Amazon Neptune with the SIGv4 
> signing required when using IAM-based authentication, but is generally 
> applicable for use of the JavaScript client with Gremlin Servers that require 
> additional header information. 
> The corresponding PR is below.
> [Pull Request|https://github.com/apache/tinkerpop/pull/929]



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


[jira] [Commented] (TINKERPOP-2035) Gremlin-JavaScript: Pass custom headers to the websocket connection

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/929
  
Thanks for the patch @deejvince and thanks for filing TINKERPOP-2035 
@beebs-systap !

I think its a good idea to expose ways to set the request header, as it's 
part of the [protocol](https://tools.ietf.org/html/rfc6455). You will need the 
option to set the header on all GLVs (i.e., Python, C#, Java), right?


> Gremlin-JavaScript: Pass custom headers to the websocket connection
> ---
>
> Key: TINKERPOP-2035
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2035
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.3.3
>Reporter: Brad Bebee
>Priority: Major
>
> In some cases, it is required to pass extra header information to the Gremlin 
> server to successfully make a connection. This ticket is to add the feature 
> to enable users to optionally pass headers via the JavaScript client when 
> connecting to a Gremlin Server.
> This was originally noted when connecting to Amazon Neptune with the SIGv4 
> signing required when using IAM-based authentication, but is generally 
> applicable for use of the JavaScript client with Gremlin Servers that require 
> additional header information. 
> The corresponding PR is below.
> [Pull Request|https://github.com/apache/tinkerpop/pull/929]



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


[GitHub] tinkerpop pull request #929: TINKERPOP-2035 Pass custom headers to the webso...

2018-09-13 Thread jorgebay
Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/929#discussion_r217371869
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -49,12 +49,14 @@ class DriverRemoteConnection extends RemoteConnection {
* @param {String} [options.traversalSource] The traversal source. 
Defaults to: 'g'.
* @param {GraphSONWriter} [options.writer] The writer to use.
* @param {Authenticator} [options.authenticator] The authentication 
handler to use.
+   * @param {String} [options.headers] Add custom headers to the request.
--- End diff --

The correct type of the `@param` is `{Object}`.

What do you think about providing a little more detail, like: "An 
associative array containing the additional header key/values for the initial 
request"


---


[jira] [Commented] (TINKERPOP-2035) Gremlin-JavaScript: Pass custom headers to the websocket connection

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/929#discussion_r217371869
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -49,12 +49,14 @@ class DriverRemoteConnection extends RemoteConnection {
* @param {String} [options.traversalSource] The traversal source. 
Defaults to: 'g'.
* @param {GraphSONWriter} [options.writer] The writer to use.
* @param {Authenticator} [options.authenticator] The authentication 
handler to use.
+   * @param {String} [options.headers] Add custom headers to the request.
--- End diff --

The correct type of the `@param` is `{Object}`.

What do you think about providing a little more detail, like: "An 
associative array containing the additional header key/values for the initial 
request"


> Gremlin-JavaScript: Pass custom headers to the websocket connection
> ---
>
> Key: TINKERPOP-2035
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2035
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.3.3
>Reporter: Brad Bebee
>Priority: Major
>
> In some cases, it is required to pass extra header information to the Gremlin 
> server to successfully make a connection. This ticket is to add the feature 
> to enable users to optionally pass headers via the JavaScript client when 
> connecting to a Gremlin Server.
> This was originally noted when connecting to Amazon Neptune with the SIGv4 
> signing required when using IAM-based authentication, but is generally 
> applicable for use of the JavaScript client with Gremlin Servers that require 
> additional header information. 
> The corresponding PR is below.
> [Pull Request|https://github.com/apache/tinkerpop/pull/929]



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


[jira] [Updated] (TINKERPOP-2033) Maintain order of profile() annotations

2018-09-13 Thread stephen mallette (JIRA)


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

stephen mallette updated TINKERPOP-2033:

 Labels:   (was: breaking)
Description: 
The {{annotations}} of {{ImmutableMetrics}} uses a {{ConcurrentHashMap}} but 
that of course loses the insertion order. Convert to a {{synchronizedMap}} that 
takes a {{LinkedHashMap}} to maintain that order as well as the ability to 
support concurrent access which is an issue for some graphs. 

There was some question as to whether or not this change was breaking to the 
Gryo format or not ,but it appears that it is not. Gryo 1.0 and 3.0 remain as 
intact as they were on previous releases, though it is worth noting that Gryo 
1.0 broke on release on 3.3.0 when it comes to "metrics" serialization so that 
break is still intact. Therefore you can't use Gryo 1.0 between 3.2.x and 
3.3.x/3.4.x. Not sure how that happened exactly.

  was:
The {{annotations}} of {{ImmutableMetrics}} uses a {{ConcurrentHashMap}} but 
that of course loses the insertion order. Convert to a {{synchronizedMap}} that 
takes a {{LinkedHashMap}} to maintain that order as well as the ability to 
support concurrent access which is an issue for some graphs.

This is a breaking change on Gryo 1.0 because there was no abstraction for 
"metrics" class serialization in Gryo for that version. Any sort of change to 
the object model would cause a break. Upgrade docs will discuss the upgrade 
options.


> Maintain order of profile() annotations
> ---
>
> Key: TINKERPOP-2033
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2033
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
> Fix For: 3.4.0
>
>
> The {{annotations}} of {{ImmutableMetrics}} uses a {{ConcurrentHashMap}} but 
> that of course loses the insertion order. Convert to a {{synchronizedMap}} 
> that takes a {{LinkedHashMap}} to maintain that order as well as the ability 
> to support concurrent access which is an issue for some graphs. 
> There was some question as to whether or not this change was breaking to the 
> Gryo format or not ,but it appears that it is not. Gryo 1.0 and 3.0 remain as 
> intact as they were on previous releases, though it is worth noting that Gryo 
> 1.0 broke on release on 3.3.0 when it comes to "metrics" serialization so 
> that break is still intact. Therefore you can't use Gryo 1.0 between 3.2.x 
> and 3.3.x/3.4.x. Not sure how that happened exactly.



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


[GitHub] tinkerpop pull request #932: TINKERPOP-2033 Maintain order in profile() anno...

2018-09-13 Thread spmallette
GitHub user spmallette opened a pull request:

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

TINKERPOP-2033 Maintain order in profile() annotations

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

Used a synchronized map around a `LinkedHashMap` rather than 
`ConcurrentHashMap`. Not expecting a performance issue with this as its for 
`profile()` step which doesn't have to be "fast" necessarily as it is a 
debugging step. 

Tested manually for backward compatibility across a number of different 
versions. That was quite time consuming because I'd not realized that the we'd 
introduced a perhaps unintended break between 3.3.0 and 3.2.x when it comes to 
"metrics" serialization in Gryo 1.0. Ultimately, I should have just accepted 
the output i was seeing in the IO tests as being correct in terms of what the 
compatibility was.

Note that while the Gryo 1.0 test file changed for 3.4.0 it still remains 
compatible with previous versions - there is just a different representation of 
a {{Map}} in the binary. All of this seems somehow a  non-issue because Gryo 
3.0 has been the default since 3.3.0 released.

VOTE +1

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

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

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

https://github.com/apache/tinkerpop/pull/932.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #932


commit 788bf8703488f02ed1a609c6d2abf56cc4c24b3f
Author: Stephen Mallette 
Date:   2018-09-11T16:44:07Z

TINKERPOP-2033 Maintain order in profile() annotations

Used a synchronized map around a LinkedHashMap rather than 
ConcurrentHashMap. Not expecting a performance issue with this as its for 
profile() step which doesn't have to be "fast" per se as it is a debugging 
step. Affected gryo more than graphson - specifically gryo 1.0 which didn't 
coerce "metrics" to an interfaces as it does in 3.0. Added a custom serializer 
to force the annotations to a regular LinkedHashMap and then back to 
synchronized LinkedHashMap during serder to keep compatibility.




---


[jira] [Commented] (TINKERPOP-2033) Maintain order of profile() annotations

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

GitHub user spmallette opened a pull request:

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

TINKERPOP-2033 Maintain order in profile() annotations

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

Used a synchronized map around a `LinkedHashMap` rather than 
`ConcurrentHashMap`. Not expecting a performance issue with this as its for 
`profile()` step which doesn't have to be "fast" necessarily as it is a 
debugging step. 

Tested manually for backward compatibility across a number of different 
versions. That was quite time consuming because I'd not realized that the we'd 
introduced a perhaps unintended break between 3.3.0 and 3.2.x when it comes to 
"metrics" serialization in Gryo 1.0. Ultimately, I should have just accepted 
the output i was seeing in the IO tests as being correct in terms of what the 
compatibility was.

Note that while the Gryo 1.0 test file changed for 3.4.0 it still remains 
compatible with previous versions - there is just a different representation of 
a {{Map}} in the binary. All of this seems somehow a  non-issue because Gryo 
3.0 has been the default since 3.3.0 released.

VOTE +1

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

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

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

https://github.com/apache/tinkerpop/pull/932.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #932


commit 788bf8703488f02ed1a609c6d2abf56cc4c24b3f
Author: Stephen Mallette 
Date:   2018-09-11T16:44:07Z

TINKERPOP-2033 Maintain order in profile() annotations

Used a synchronized map around a LinkedHashMap rather than 
ConcurrentHashMap. Not expecting a performance issue with this as its for 
profile() step which doesn't have to be "fast" per se as it is a debugging 
step. Affected gryo more than graphson - specifically gryo 1.0 which didn't 
coerce "metrics" to an interfaces as it does in 3.0. Added a custom serializer 
to force the annotations to a regular LinkedHashMap and then back to 
synchronized LinkedHashMap during serder to keep compatibility.




> Maintain order of profile() annotations
> ---
>
> Key: TINKERPOP-2033
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2033
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
> Fix For: 3.4.0
>
>
> The {{annotations}} of {{ImmutableMetrics}} uses a {{ConcurrentHashMap}} but 
> that of course loses the insertion order. Convert to a {{synchronizedMap}} 
> that takes a {{LinkedHashMap}} to maintain that order as well as the ability 
> to support concurrent access which is an issue for some graphs. 
> There was some question as to whether or not this change was breaking to the 
> Gryo format or not ,but it appears that it is not. Gryo 1.0 and 3.0 remain as 
> intact as they were on previous releases, though it is worth noting that Gryo 
> 1.0 broke on release on 3.3.0 when it comes to "metrics" serialization so 
> that break is still intact. Therefore you can't use Gryo 1.0 between 3.2.x 
> and 3.3.x/3.4.x. Not sure how that happened exactly.



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


Re: [DISCUSS] Uniqueness of property ids

2018-09-13 Thread Stephen Mallette
I probably should have added this yesterday when I replied but +1 to local
uniqueness for vertex property identifiers. kinda surprised that we didn't
have this enforced already in the test suite.

On Wed, Sep 12, 2018 at 3:14 PM Stephen Mallette 
wrote:

> that much actually makes sense - the problem is the TinkerGraph default
> configuration and Java Number Brain Damage
>
> On Wed, Sep 12, 2018 at 3:12 PM Robert Dale  wrote:
>
>> Very strange indeed...
>>
>> gremlin> g = TinkerGraph.open().traversal()
>> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
>> gremlin>  g.addV().property('name','marko')
>> ==>v[0]
>> gremlin> g.addV().property(single, 'name', 'stephen', id, 4L)
>> ==>v[2]
>> gremlin> g.addV().property('name','daniel')
>> ==>v[3]
>> gremlin> g.V().valueMap(true)
>> ==>[id:0,label:vertex,name:[marko]]
>> ==>[id:2,label:vertex,name:[stephen]]
>> ==>[id:3,label:vertex,name:[daniel]]
>> gremlin> g.V().properties().valueMap(true)
>> ==>[id:1,key:name,value:marko]
>> ==>[id:4,key:name,value:stephen]
>> ==>[id:4,key:name,value:stephen]
>>
>> v3.3.3
>>
>> Robert Dale
>>
>>
>> On Wed, Sep 12, 2018 at 2:21 PM Daniel Kuppitz  wrote:
>>
>> > Right now we don't enforce uniqueness of property ids, which can lead to
>> > very weird results:
>> >
>> > gremlin> g = TinkerGraph.open().traversal()
>> > ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
>> > gremlin> g.addV().property(single, 'foo', 'bar', id, 1).property(single,
>> > 'bar', 'baz', id, 1)
>> > ==>v[0]
>> > gremlin> g.V().properties().hasId(1)
>> > ==>vp[bar->baz]
>> > ==>vp[bar->baz]
>> >
>> >
>> > If we allow users to manually specify property ids, the above query
>> should
>> > throw an exception.
>> >
>> > IMO, local uniqueness should be enough (given alone the complexity it
>> would
>> > require to ensure global uniqueness).
>> >
>> > Thoughts? Objections? More/other suggestions?
>> >
>> > Cheers,
>> > Daniel
>> >
>>
>


[GitHub] tinkerpop pull request #922: TINKERPOP-1959: Gremlin Javascript ability to s...

2018-09-13 Thread mattallenuk
Github user mattallenuk commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/922#discussion_r217498294
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/translator.js
 ---
@@ -0,0 +1,93 @@
+/*
+ *  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.
+ */
+'use strict';
+
+/**
+ * Class to translate glv bytecode steps into executable Gremlin-Groovy 
script
+ */
+class Translator {
--- End diff --

@jorgebay I'm more than happy to move the Translator functionality into a 
support project if it doesn't fit within the gremlin-javascript project. I 
realise it might be too specific a case and hope I haven't overstepped a mark 
by including it with this PR, it just made total sense to me.


---


[jira] [Commented] (TINKERPOP-1959) Provide a way to submit scripts to the server in gremlin-javascript

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/922#discussion_r217498294
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/translator.js
 ---
@@ -0,0 +1,93 @@
+/*
+ *  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.
+ */
+'use strict';
+
+/**
+ * Class to translate glv bytecode steps into executable Gremlin-Groovy 
script
+ */
+class Translator {
--- End diff --

@jorgebay I'm more than happy to move the Translator functionality into a 
support project if it doesn't fit within the gremlin-javascript project. I 
realise it might be too specific a case and hope I haven't overstepped a mark 
by including it with this PR, it just made total sense to me.


> Provide a way to submit scripts to the server in gremlin-javascript
> ---
>
> Key: TINKERPOP-1959
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1959
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.8
>Reporter: stephen mallette
>Priority: Critical
>
> It is currently only possible to submit bytecode based requests to the server 
> with gremlin-javascript. We should also provide some means for submitting 
> scripts.



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


[GitHub] tinkerpop pull request #922: TINKERPOP-1959: Gremlin Javascript ability to s...

2018-09-13 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/922#discussion_r217501779
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/translator.js
 ---
@@ -0,0 +1,93 @@
+/*
+ *  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.
+ */
+'use strict';
+
+/**
+ * Class to translate glv bytecode steps into executable Gremlin-Groovy 
script
+ */
+class Translator {
--- End diff --

I think translators are an established part of TinkerPop at this point. We 
have them for Java, Groovy, and Python and I've personally found them to be 
insanely useful on so many internal odds/ends. We don't over-publicize them 
because we don't want to promote "scripts" but I understand the current need 
for CosmosDB. 

Anyway, including a Javascript translator is an acceptable addition imo.


---


[jira] [Commented] (TINKERPOP-1959) Provide a way to submit scripts to the server in gremlin-javascript

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/922#discussion_r217501779
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/translator.js
 ---
@@ -0,0 +1,93 @@
+/*
+ *  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.
+ */
+'use strict';
+
+/**
+ * Class to translate glv bytecode steps into executable Gremlin-Groovy 
script
+ */
+class Translator {
--- End diff --

I think translators are an established part of TinkerPop at this point. We 
have them for Java, Groovy, and Python and I've personally found them to be 
insanely useful on so many internal odds/ends. We don't over-publicize them 
because we don't want to promote "scripts" but I understand the current need 
for CosmosDB. 

Anyway, including a Javascript translator is an acceptable addition imo.


> Provide a way to submit scripts to the server in gremlin-javascript
> ---
>
> Key: TINKERPOP-1959
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1959
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.8
>Reporter: stephen mallette
>Priority: Critical
>
> It is currently only possible to submit bytecode based requests to the server 
> with gremlin-javascript. We should also provide some means for submitting 
> scripts.



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


[GitHub] tinkerpop pull request #929: TINKERPOP-2035 Pass custom headers to the webso...

2018-09-13 Thread deejvince
Github user deejvince commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/929#discussion_r217509807
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -49,12 +49,14 @@ class DriverRemoteConnection extends RemoteConnection {
* @param {String} [options.traversalSource] The traversal source. 
Defaults to: 'g'.
* @param {GraphSONWriter} [options.writer] The writer to use.
* @param {Authenticator} [options.authenticator] The authentication 
handler to use.
+   * @param {String} [options.headers] Add custom headers to the request.
--- End diff --

Hi, You're correct, i'm fixing this right away.
Thanks!


---


[jira] [Commented] (TINKERPOP-2035) Gremlin-JavaScript: Pass custom headers to the websocket connection

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/929#discussion_r217509807
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -49,12 +49,14 @@ class DriverRemoteConnection extends RemoteConnection {
* @param {String} [options.traversalSource] The traversal source. 
Defaults to: 'g'.
* @param {GraphSONWriter} [options.writer] The writer to use.
* @param {Authenticator} [options.authenticator] The authentication 
handler to use.
+   * @param {String} [options.headers] Add custom headers to the request.
--- End diff --

Hi, You're correct, i'm fixing this right away.
Thanks!


> Gremlin-JavaScript: Pass custom headers to the websocket connection
> ---
>
> Key: TINKERPOP-2035
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2035
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.3.3
>Reporter: Brad Bebee
>Priority: Major
>
> In some cases, it is required to pass extra header information to the Gremlin 
> server to successfully make a connection. This ticket is to add the feature 
> to enable users to optionally pass headers via the JavaScript client when 
> connecting to a Gremlin Server.
> This was originally noted when connecting to Amazon Neptune with the SIGv4 
> signing required when using IAM-based authentication, but is generally 
> applicable for use of the JavaScript client with Gremlin Servers that require 
> additional header information. 
> The corresponding PR is below.
> [Pull Request|https://github.com/apache/tinkerpop/pull/929]



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


[GitHub] tinkerpop pull request #929: TINKERPOP-2035 Pass custom headers to the webso...

2018-09-13 Thread deejvince
Github user deejvince commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/929#discussion_r217515752
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -49,12 +49,14 @@ class DriverRemoteConnection extends RemoteConnection {
* @param {String} [options.traversalSource] The traversal source. 
Defaults to: 'g'.
* @param {GraphSONWriter} [options.writer] The writer to use.
* @param {Authenticator} [options.authenticator] The authentication 
handler to use.
+   * @param {String} [options.headers] Add custom headers to the request.
--- End diff --

Regarding other GLVs, yes i believe its important to have that.


---


[jira] [Commented] (TINKERPOP-2035) Gremlin-JavaScript: Pass custom headers to the websocket connection

2018-09-13 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/929#discussion_r217515752
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
@@ -49,12 +49,14 @@ class DriverRemoteConnection extends RemoteConnection {
* @param {String} [options.traversalSource] The traversal source. 
Defaults to: 'g'.
* @param {GraphSONWriter} [options.writer] The writer to use.
* @param {Authenticator} [options.authenticator] The authentication 
handler to use.
+   * @param {String} [options.headers] Add custom headers to the request.
--- End diff --

Regarding other GLVs, yes i believe its important to have that.


> Gremlin-JavaScript: Pass custom headers to the websocket connection
> ---
>
> Key: TINKERPOP-2035
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2035
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.3.3
>Reporter: Brad Bebee
>Priority: Major
>
> In some cases, it is required to pass extra header information to the Gremlin 
> server to successfully make a connection. This ticket is to add the feature 
> to enable users to optionally pass headers via the JavaScript client when 
> connecting to a Gremlin Server.
> This was originally noted when connecting to Amazon Neptune with the SIGv4 
> signing required when using IAM-based authentication, but is generally 
> applicable for use of the JavaScript client with Gremlin Servers that require 
> additional header information. 
> The corresponding PR is below.
> [Pull Request|https://github.com/apache/tinkerpop/pull/929]



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


Re: [DISCUSS] Uniqueness of property ids

2018-09-13 Thread Robert Dale
When you say 'local', do you mean local to VertexProperty IDs only as
opposed to 'global' including Vertex IDs and Edge IDs?

Robert Dale


On Thu, Sep 13, 2018 at 11:29 AM Stephen Mallette 
wrote:

> I probably should have added this yesterday when I replied but +1 to local
> uniqueness for vertex property identifiers. kinda surprised that we didn't
> have this enforced already in the test suite.
>
> On Wed, Sep 12, 2018 at 3:14 PM Stephen Mallette 
> wrote:
>
> > that much actually makes sense - the problem is the TinkerGraph default
> > configuration and Java Number Brain Damage
> >
> > On Wed, Sep 12, 2018 at 3:12 PM Robert Dale  wrote:
> >
> >> Very strange indeed...
> >>
> >> gremlin> g = TinkerGraph.open().traversal()
> >> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> >> gremlin>  g.addV().property('name','marko')
> >> ==>v[0]
> >> gremlin> g.addV().property(single, 'name', 'stephen', id, 4L)
> >> ==>v[2]
> >> gremlin> g.addV().property('name','daniel')
> >> ==>v[3]
> >> gremlin> g.V().valueMap(true)
> >> ==>[id:0,label:vertex,name:[marko]]
> >> ==>[id:2,label:vertex,name:[stephen]]
> >> ==>[id:3,label:vertex,name:[daniel]]
> >> gremlin> g.V().properties().valueMap(true)
> >> ==>[id:1,key:name,value:marko]
> >> ==>[id:4,key:name,value:stephen]
> >> ==>[id:4,key:name,value:stephen]
> >>
> >> v3.3.3
> >>
> >> Robert Dale
> >>
> >>
> >> On Wed, Sep 12, 2018 at 2:21 PM Daniel Kuppitz  wrote:
> >>
> >> > Right now we don't enforce uniqueness of property ids, which can lead
> to
> >> > very weird results:
> >> >
> >> > gremlin> g = TinkerGraph.open().traversal()
> >> > ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> >> > gremlin> g.addV().property(single, 'foo', 'bar', id,
> 1).property(single,
> >> > 'bar', 'baz', id, 1)
> >> > ==>v[0]
> >> > gremlin> g.V().properties().hasId(1)
> >> > ==>vp[bar->baz]
> >> > ==>vp[bar->baz]
> >> >
> >> >
> >> > If we allow users to manually specify property ids, the above query
> >> should
> >> > throw an exception.
> >> >
> >> > IMO, local uniqueness should be enough (given alone the complexity it
> >> would
> >> > require to ensure global uniqueness).
> >> >
> >> > Thoughts? Objections? More/other suggestions?
> >> >
> >> > Cheers,
> >> > Daniel
> >> >
> >>
> >
>


[GitHub] tinkerpop issue #915: Tinkerpop 1913-Followup

2018-09-13 Thread ashwinisingh01
Github user ashwinisingh01 commented on the issue:

https://github.com/apache/tinkerpop/pull/915
  
@redoz , I see your push in the PR. I hope you are unblocked to make 
changes directly to the PR. Let me know if you still need help


---


[GitHub] tinkerpop issue #915: Tinkerpop 1913-Followup

2018-09-13 Thread redoz
Github user redoz commented on the issue:

https://github.com/apache/tinkerpop/pull/915
  
@ashwinisingh01 I was accidentally trying to push it to your original 
account (@ashwini-ms), I just noticed and fixed it. I've rebased your changes 
on top of apache/Tinkerpop-1913 and added mine as well, hopefully it's all good 
now.


---


[DISCUSS] groovy-sql

2018-09-13 Thread Robert Dale
gremlin-driver has a direct dependency on groovy-sql.  I removed it in
master and all tests pass (docker/build.sh -i -t -n) so there does not
appear to be any direct or indirect usage.

Why is it there? Looks like it was pulled in because of
https://issues.apache.org/jira/browse/TINKERPOP-713
However, groovy-sql does not appear to be a dependency of groovy-console or
anything groovy (except groovy-all). Wasn't then, isn't now.

Any objections to removing it?

-- 
Robert Dale


[GitHub] tinkerpop issue #915: Tinkerpop 1913-Followup

2018-09-13 Thread redoz
Github user redoz commented on the issue:

https://github.com/apache/tinkerpop/pull/915
  
Not sure why the travis build is failing, it looks java related to me. Any 
thoughts @spmallette?


---