[jira] [Commented] (TINKERPOP-2412) Add missing query tests

2020-08-31 Thread Divij Vaidya (Jira)


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

Divij Vaidya commented on TINKERPOP-2412:
-

No. I am talking specifically about having the as() binding with the steps I 
mentioned above such as count(), barrier(), path(), valueMap() etc. AND them 
being the only steps which contain as() bindings. 

Let's say there was a bug in the addition of requirement logic of the order() 
step. The example you quoted above will not catch that bug because Labeled.Path 
requirement has already been added to the traversal by the V().as("a"). Hence, 
even if there is a bug in order() step's requirement addition, the query will 
still produce correct result. 

We should have a test case for each step where they are the only ones adding 
the LP requirement. 

Does that make sense? 

> Add missing query tests
> ---
>
> Key: TINKERPOP-2412
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2412
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: test-suite
>Affects Versions: 3.4.8
>Reporter: Divij Vaidya
>Priority: Minor
>
> In our Gremlin query test suites, we do not have tests that would test the 
> following pattern of queries:
> # "blah().barrier().as('x')blah().select('x')"
> # "blah().valueMap().as('x')blah().select('x')"
> # "blah().path().as('x')blah().select('x')"
> # "blah().count().as('x')blah().select('x')"
> The category of tests can be clubbed into defining an alias and using the 
> value of the alias further ahead in the traversal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2412) Add missing query tests

2020-08-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2412:
-

Does this test not fit that pattern:

{code}
g.V().as("a").out("created").as("b").math("b + 
a").by(in("created").count()).by("age")
{code}

https://github.com/apache/tinkerpop/blob/c4754ed292ec17c38842c2b34eeb2b5b2dbd4dda/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MathTest.java#L149

> Add missing query tests
> ---
>
> Key: TINKERPOP-2412
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2412
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: test-suite
>Affects Versions: 3.4.8
>Reporter: Divij Vaidya
>Priority: Minor
>
> In our Gremlin query test suites, we do not have tests that would test the 
> following pattern of queries:
> # "blah().barrier().as('x')blah().select('x')"
> # "blah().valueMap().as('x')blah().select('x')"
> # "blah().path().as('x')blah().select('x')"
> # "blah().count().as('x')blah().select('x')"
> The category of tests can be clubbed into defining an alias and using the 
> value of the alias further ahead in the traversal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (TINKERPOP-1346) Gryo 4.0

2020-08-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette closed TINKERPOP-1346.
---
Resolution: Won't Do

Adding a reference to this DISCUSS thread:

https://lists.apache.org/thread.html/rc68d0bf3d6530f14d328fc5f2d5ec141a7e50aac67b2920743612526%40%3Cdev.tinkerpop.apache.org%3E

which basically puts aside the idea of doing Gryo 4.0 as we no longer use it 
for network serialization. I suppose that this issue is more about a different 
type of usage, but to avoid confusion for now I'm going to close this issue. 

> Gryo 4.0
> 
>
> Key: TINKERPOP-1346
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1346
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io, structure
>Affects Versions: 3.2.0-incubating
>Reporter: Marko A. Rodriguez
>Priority: Major
>  Labels: breaking
>
> *Reference*
> Right now, to send a {{ReferenceEdge}} message, we serialize the form as:
> {code:java}
> KryoClassInteger[ReferenceEdge] + KryoClassObject[Edge ID] + 
> KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID] + 
> KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID]
> {code}
> Assuming {{Long}} Element ids, the math says:
> {code:java}
> 48 bytes = 4 bytes + (4 bytes + 8 bytes [long]) + 4 bytes + (4 bytes + 8 
> bytes [long]) + 4 bytes + (4 bytes + 8 bytes [long])
> {code}
> We could get this smaller by not relying on Kryo's {{FieldSerializer}}.
> {code:java}
> KryoClassInteger[ReferenceEdge] + KryoClassInteger[VertexIDClass] + 
> KryoClassObject[Edge ID] + KryoObject[Vertex ID] + KryoObject[Vertex ID]
> {code}
> The math says:
> {code:java}
> 36 bytes = 4 bytes + 4 bytes + (4 bytes + 8 bytes [long]) + 8 bytes [long] + 
> 8 bytes [long]
> {code}
> Similar techniques would apply to {{ReferenceVertexProperty}} and 
> {{ReferenceProperty}}.
> *StarGraph*
> Right now we serialize first the vertex, then its edges, then its properties. 
> We should do vertex, properties, edges. Why? If we know that the vertex is to 
> be filtered (which is an analysis of its label/id/properties), then we can 
> skip over analyzing its edges. Right now, we may do all this work 
> deserializing edges only to realize that the GraphFilter says that the vertex 
> is filtered. Dah, pointless clock cycles – especially when edge sets can be 
> massive.
> {{StarGraph}} is used by the Hadoop {{GraphComputers}} and represents a 
> vertex, its properties, its incident edges, and their properties. In essence, 
> one "row of an adjacency list."
> Here are some ideas on how to make the next version of the serialization 
> format more efficient.
> 1. For all Element ids, we currently use {{kryo.readClassAndObject(...)}}. 
> This is bad because we have to write the class with each id. It would be 
> better if the {{StarGraph}} had metadata like {{vertexIdClass}}, 
> {{vertexPropertyIdClass}}, and {{edgeIdClass}}. Now for every vertex we are 
> serializing three class, but the benefit is that every id class is now known 
> and we can use {{kryo.readObject(..., xxxIdClass)}}.
> 2. Edges and VertexProperties are written out as {{[ edgeLabel[ edge[ id, 
> otherVertexId]*]*}} and {{[ propertyKey[ vertexProperty[ 
> id,propertyValue]*]*}}, respectively. This ensures we don't write so many 
> strings as all edges/vertex properties are grouped by label. However, we do 
> NOT do this for edge properties nor vertex property properties. We simply 
> write out the {{Map>}} which is 
> {{Map>}}. Since we have to choose 
> between grouping by edgeId or by propertyKey, we should keep it as it is, but 
> create a "meta map" that allows us to represent all property keys in a, e.g., 
> {{int}} space. Thus, {{Map>}} 
> where we also have a {{Map}} that is serialized 
> with the {{StarGraph}}.
> StarGraph also has a Long identifer - This makes no sense as then each 
> StarGraph in the full Graph will have similar ids! Moreover, what is 
> referencing what when the adjacent vertices are just arbitrary long ids?!! We 
> should require that StarGraph get provided ids for vertices (and perhaps 
> edges)... We ensure no inconsistencies and we save 64-bits.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2412) Add missing query tests

2020-08-31 Thread Divij Vaidya (Jira)


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

Divij Vaidya commented on TINKERPOP-2412:
-

The specific tests I am looking for are where stepUnderTest().as('x') is the 
only pattern in the query which add the TraverserRequirement for Labeled Path 
and then the labeled path requirement is used further ahead in the query (maybe 
in select or in math). A couple of examples are:

{{g.V().count().as("num").math("num * 2")}}

{{OR}}
{{}}

{{g.V().properties().path().by(T.id).by(T.value).as("myProp").select("myProp")}}


Please feel free to point me to tests if you think these cases are already 
represented. 

> Add missing query tests
> ---
>
> Key: TINKERPOP-2412
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2412
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: test-suite
>Affects Versions: 3.4.8
>Reporter: Divij Vaidya
>Priority: Minor
>
> In our Gremlin query test suites, we do not have tests that would test the 
> following pattern of queries:
> # "blah().barrier().as('x')blah().select('x')"
> # "blah().valueMap().as('x')blah().select('x')"
> # "blah().path().as('x')blah().select('x')"
> # "blah().count().as('x')blah().select('x')"
> The category of tests can be clubbed into defining an alias and using the 
> value of the alias further ahead in the traversal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (TINKERPOP-2412) Add missing query tests

2020-08-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette updated TINKERPOP-2412:

Issue Type: Improvement  (was: Test)

> Add missing query tests
> ---
>
> Key: TINKERPOP-2412
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2412
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: test-suite
>Affects Versions: 3.4.8
>Reporter: Divij Vaidya
>Priority: Minor
>
> In our Gremlin query test suites, we do not have tests that would test the 
> following pattern of queries:
> # "blah().barrier().as('x')blah().select('x')"
> # "blah().valueMap().as('x')blah().select('x')"
> # "blah().path().as('x')blah().select('x')"
> # "blah().count().as('x')blah().select('x')"
> The category of tests can be clubbed into defining an alias and using the 
> value of the alias further ahead in the traversal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (TINKERPOP-2396) TraverserSet should be extendable for GraphDB provider

2020-08-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette reassigned TINKERPOP-2396:
---

Assignee: Stephen Mallette

> TraverserSet should be extendable for GraphDB provider
> --
>
> Key: TINKERPOP-2396
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2396
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Reporter: Norio Akagi
>Assignee: Stephen Mallette
>Priority: Minor
>
> Currently in many TinkerPop steps, TraverserSet is internally created and 
> used. 
>  However GraphDB provider may want to use their own TraverserSet to change 
> the logic  how it populates an inner Map.
> Just let me give one example
> Say internally we have a different representation of id (which won't be 
> exposed to client when the result is returned) for each element and want to 
> use it for hash key.
> Because we can't overwrite ElementHelper's behavior so first we tried 
> overriding Element#hashCode but after that we saw that this test effectively 
> fails.
>  
> [https://github.com/apache/tinkerpop/blob/cff4c161615f2b50bda27b6ba523c7f52b833532/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexTest.java#L75]
>  Here v is our own custom vertex instance which uses internal id for hashCode 
> but DetachedVertex just uses a user facing id copied from v, so they are not 
> considered as equal when used as hash key.
> We may skip this test but it's better to keep all Tinkerpop tests passed as 
> GraphDB provider I think.
> So instead, I will propose to change so that we can add a capability to swap 
> TraverserSet as needed.
>  The change should be simple, 
>  1. ExpandableIterator should have constructor like ExpandableIterator(final 
> Step hostStep, final TraverserSet traverserSet) and use the 
> traverserSet as its own traverserSet value.
>  2. AbstractStep should have construct like AbstractStep(final 
> Traversal.Admin traversal, final Supplier> 
> traverserSetSupplier) and use traverserSetSuppler.get() for all places that 
> currently we instantiate new TraverserSet.
>  Also this supplier.get() may be passed when AbstractStep instantiates 
> ExpandableIterator.
> So still GraphDB provider needs to extends all Steps that deals with 
> TraverserSet and overwrite their constructor to have their own 
> traverserSetSupplier, but after that they can freely use their own 
> TraverserSet, so the logic how the key of TraverserSet is determined is up to 
> GraphDB provider.
>  Or if we add some helper method like getTraverserSetSupplier under, for 
> instance, Graph class, then instead of extending all steps we can just 
> override that method under our own Graph class. But I am not sure which is 
> better in this case, but either way the goal is the same.
> Any thoughts or objections on this idea ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2412) Add missing query tests

2020-08-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2412:
-

I'm sorry but I don't completely follow what type of tests you'd like to add as 
most of our tests for {{select()}} appear in the pattern you show in the 
description where you add that step last in the traversal. Are you saying you 
want tests that do something with "x" after the final {{select("x")}} in your 
examples, thus something like:

{code}
blah().valueMap().as('x')blah().select('x').select('name')
{code}



> Add missing query tests
> ---
>
> Key: TINKERPOP-2412
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2412
> Project: TinkerPop
>  Issue Type: Test
>  Components: test-suite
>Affects Versions: 3.4.8
>Reporter: Divij Vaidya
>Priority: Minor
>
> In our Gremlin query test suites, we do not have tests that would test the 
> following pattern of queries:
> # "blah().barrier().as('x')blah().select('x')"
> # "blah().valueMap().as('x')blah().select('x')"
> # "blah().path().as('x')blah().select('x')"
> # "blah().count().as('x')blah().select('x')"
> The category of tests can be clubbed into defining an alias and using the 
> value of the alias further ahead in the traversal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2407) Support deserialization of a dict that has a dict as a key

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

spmallette merged pull request #1314:
URL: https://github.com/apache/tinkerpop/pull/1314


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support deserialization of a dict that has a dict as a key
> --
>
> Key: TINKERPOP-2407
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2407
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
>
> The following traversal will fail for Python as a{{dict}} is not hashable:
> {code}
> gremlin> g.V().has('person', 'name', 
> 'marko').elementMap("name").groupCount().next()
> ==>{id=1, label=person, name=marko}=1
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (TINKERPOP-2407) Support deserialization of a dict that has a dict as a key

2020-08-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette closed TINKERPOP-2407.
---
Fix Version/s: 3.5.0
   Resolution: Done

> Support deserialization of a dict that has a dict as a key
> --
>
> Key: TINKERPOP-2407
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2407
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Assignee: Stephen Mallette
>Priority: Major
> Fix For: 3.5.0
>
>
> The following traversal will fail for Python as a{{dict}} is not hashable:
> {code}
> gremlin> g.V().has('person', 'name', 
> 'marko').elementMap("name").groupCount().next()
> ==>{id=1, label=person, name=marko}=1
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2410) Free up server threads when client is closed

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

spmallette commented on pull request #1318:
URL: https://github.com/apache/tinkerpop/pull/1318#issuecomment-684120489


   I see you brought in the fix from 3.4-dev and the test failure is cleaned 
up. I'm good with this change - builds with:
   
   `mvn clean install -pl gremlin-server,gremlin-console 
-DskipIntegrationTests=false -DincludeNeo4j`
   
   VOTE +1 (i assume you won't bring in that merge commit at d632f2a to the 
release branches and will squash the "changelog" commit)
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Free up server threads when client is closed
> 
>
> Key: TINKERPOP-2410
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2410
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8
>Reporter: Divij Vaidya
>Priority: Minor
>
> Consider a situation where the server has sent some results back to the 
> client and is waiting for Netty channel to be writable again before sending 
> rest of the results. Let's assume that the client dies (or is closed) at this 
> instant without consuming the entire set of results.
> In this case, the server threads will continue to wait for the channel to 
> become writable (which it never will since client is dead) until the timeout 
> is hit.
> We need to change the behaviour such that the waiting thread loop breaks if 
> the channel becomes inactive. Such loop exists at TraversalOpProcessor (for 
> bytecode execution) and AbstractOpProcessor(for string execution) in the 
> server.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (TINKERPOP-2412) Add missing query tests

2020-08-31 Thread Divij Vaidya (Jira)
Divij Vaidya created TINKERPOP-2412:
---

 Summary: Add missing query tests
 Key: TINKERPOP-2412
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2412
 Project: TinkerPop
  Issue Type: Test
  Components: test-suite
Affects Versions: 3.4.8
Reporter: Divij Vaidya


In our Gremlin query test suites, we do not have tests that would test the 
following pattern of queries:

# "blah().barrier().as('x')blah().select('x')"
# "blah().valueMap().as('x')blah().select('x')"
# "blah().path().as('x')blah().select('x')"
# "blah().count().as('x')blah().select('x')"

The category of tests can be clubbed into defining an alias and using the value 
of the alias further ahead in the traversal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2410) Free up server threads when client is closed

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

spmallette commented on pull request #1318:
URL: https://github.com/apache/tinkerpop/pull/1318#issuecomment-684011732


   Getting a failing test:
   
   ```
   [ERROR] Failures: 
   [ERROR]   
GremlinServerSessionIntegrateTest.shouldBlockAdditionalRequestsDuringClose:209 
   Expected: a collection containing "INFO - Rolling back open transactions on 
graph before killing session: shouldBlockAdditionalRequestsDuringClose\n"
but: was "WARN - Timeout while trying to close connection on 
shouldBlockAdditionalRequestsDuringClose - force closing - server will close 
session on shutdown or expiration.\n"
   [INFO] 
   [ERROR] Tests run: 270, Failures: 1, Errors: 0, Skipped: 1
   ```
   
   I think you just need to rebase since you fixed this on 3.4-dev right?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Free up server threads when client is closed
> 
>
> Key: TINKERPOP-2410
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2410
> Project: TinkerPop
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8
>Reporter: Divij Vaidya
>Priority: Minor
>
> Consider a situation where the server has sent some results back to the 
> client and is waiting for Netty channel to be writable again before sending 
> rest of the results. Let's assume that the client dies (or is closed) at this 
> instant without consuming the entire set of results.
> In this case, the server threads will continue to wait for the channel to 
> become writable (which it never will since client is dead) until the timeout 
> is hit.
> We need to change the behaviour such that the waiting thread loop breaks if 
> the channel becomes inactive. Such loop exists at TraversalOpProcessor (for 
> bytecode execution) and AbstractOpProcessor(for string execution) in the 
> server.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2411) Move GremlinDslProcessor to its own artifact

2020-08-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2411:
-

Interesting analysis - thank you. I was thinking about some module 
restructuring for 3.5.0 when we could take a breaking change like this .so 
perhaps this one could be added to the list for that release. 

> Move GremlinDslProcessor to its own artifact
> 
>
> Key: TINKERPOP-2411
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2411
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.8
>Reporter: Olivier Michallat
>Priority: Minor
>
> Currently {{GremlinDslProcessor}} is located directly in the {{gremlin-core}} 
> artifact. This has a few downsides:
>  * it pulls a runtime dependency to JavaPoet
>  * annotation processing is always on. The compiler will have to scan the 
> classpath to check if {{GremlinDsl}} is used anywhere. I believe this is an 
> additional step that would not happen if no processor was present.
> It's a good practice to place annotation processors in their own artifact. 
> Then users can opt in, in one of two ways:
>  * place the JAR in their compile classpath, but not the runtime one (e.g. 
> "provided" scope in Maven)
>  * or use the special {{-processorpath}} of javac 
> ({{}} in the Maven compiler plugin config).
> Either way this provides a cleaner separation, the dependencies that are 
> specific to the processing / code generation part are not retained at runtime.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (TINKERPOP-2411) Move GremlinDslProcessor to its own artifact

2020-08-31 Thread Olivier Michallat (Jira)
Olivier Michallat created TINKERPOP-2411:


 Summary: Move GremlinDslProcessor to its own artifact
 Key: TINKERPOP-2411
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2411
 Project: TinkerPop
  Issue Type: Improvement
  Components: process
Affects Versions: 3.4.8
Reporter: Olivier Michallat


Currently {{GremlinDslProcessor}} is located directly in the {{gremlin-core}} 
artifact. This has a few downsides:
 * it pulls a runtime dependency to JavaPoet
 * annotation processing is always on. The compiler will have to scan the 
classpath to check if {{GremlinDsl}} is used anywhere. I believe this is an 
additional step that would not happen if no processor was present.

It's a good practice to place annotation processors in their own artifact. Then 
users can opt in, in one of two ways:
 * place the JAR in their compile classpath, but not the runtime one (e.g. 
"provided" scope in Maven)
 * or use the special {{-processorpath}} of javac 
({{}} in the Maven compiler plugin config).

Either way this provides a cleaner separation, the dependencies that are 
specific to the processing / code generation part are not retained at runtime.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2392) Documentation for JavaScript library is non-existent

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

spmallette commented on a change in pull request #1321:
URL: https://github.com/apache/tinkerpop/pull/1321#discussion_r480311861



##
File path: gremlin-python/src/main/jython/README.rst
##
@@ -54,8 +54,65 @@ remote graph:
 >>> g.V().both().name.toList()
 [lop, vadas, josh, marko, marko, josh, peter, ripple, lop, marko, josh, 
lop]
 
-Please see the `reference documentation 
`_
-at Apache TinkerPop for more information on usage.
+-
+Sample Traversals
+-
+
+The Gremlin language allows users to write highly expressive graph traversals 
and has a broad list of functions that
+cover a wide body of features. The `Reference Documentation 
`_
+describes these functions and other aspects of the TinkerPop ecosystem 
including some specifics on
+`Gremlin in Python 
`_ 
itself. Most of the

Review comment:
   yes - thank you. i missed that link.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Documentation for JavaScript library is non-existent
> 
>
> Key: TINKERPOP-2392
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.4.7
>Reporter: James Sumners
>Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2396) TraverserSet should be extendable for GraphDB provider

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

rdtr commented on pull request #1307:
URL: https://github.com/apache/tinkerpop/pull/1307#issuecomment-683951472


   Thanks, yes on our end we extend the default `Graph`, `Traversal` and 
`TraversalSource` class for our own usage so having `Traversal` sets a 
provider's own `TraverserSet` implementation would work for us 👍



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> TraverserSet should be extendable for GraphDB provider
> --
>
> Key: TINKERPOP-2396
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2396
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Reporter: Norio Akagi
>Priority: Minor
>
> Currently in many TinkerPop steps, TraverserSet is internally created and 
> used. 
>  However GraphDB provider may want to use their own TraverserSet to change 
> the logic  how it populates an inner Map.
> Just let me give one example
> Say internally we have a different representation of id (which won't be 
> exposed to client when the result is returned) for each element and want to 
> use it for hash key.
> Because we can't overwrite ElementHelper's behavior so first we tried 
> overriding Element#hashCode but after that we saw that this test effectively 
> fails.
>  
> [https://github.com/apache/tinkerpop/blob/cff4c161615f2b50bda27b6ba523c7f52b833532/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexTest.java#L75]
>  Here v is our own custom vertex instance which uses internal id for hashCode 
> but DetachedVertex just uses a user facing id copied from v, so they are not 
> considered as equal when used as hash key.
> We may skip this test but it's better to keep all Tinkerpop tests passed as 
> GraphDB provider I think.
> So instead, I will propose to change so that we can add a capability to swap 
> TraverserSet as needed.
>  The change should be simple, 
>  1. ExpandableIterator should have constructor like ExpandableIterator(final 
> Step hostStep, final TraverserSet traverserSet) and use the 
> traverserSet as its own traverserSet value.
>  2. AbstractStep should have construct like AbstractStep(final 
> Traversal.Admin traversal, final Supplier> 
> traverserSetSupplier) and use traverserSetSuppler.get() for all places that 
> currently we instantiate new TraverserSet.
>  Also this supplier.get() may be passed when AbstractStep instantiates 
> ExpandableIterator.
> So still GraphDB provider needs to extends all Steps that deals with 
> TraverserSet and overwrite their constructor to have their own 
> traverserSetSupplier, but after that they can freely use their own 
> TraverserSet, so the logic how the key of TraverserSet is determined is up to 
> GraphDB provider.
>  Or if we add some helper method like getTraverserSetSupplier under, for 
> instance, Graph class, then instead of extending all steps we can just 
> override that method under our own Graph class. But I am not sure which is 
> better in this case, but either way the goal is the same.
> Any thoughts or objections on this idea ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2392) Documentation for JavaScript library is non-existent

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

aboudreault commented on pull request #1321:
URL: https://github.com/apache/tinkerpop/pull/1321#issuecomment-683915577


   Yep, good docs changes. Thanks Stephen!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Documentation for JavaScript library is non-existent
> 
>
> Key: TINKERPOP-2392
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.4.7
>Reporter: James Sumners
>Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2392) Documentation for JavaScript library is non-existent

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

aboudreault commented on a change in pull request #1321:
URL: https://github.com/apache/tinkerpop/pull/1321#discussion_r480273054



##
File path: gremlin-python/src/main/jython/README.rst
##
@@ -54,8 +54,65 @@ remote graph:
 >>> g.V().both().name.toList()
 [lop, vadas, josh, marko, marko, josh, peter, ripple, lop, marko, josh, 
lop]
 
-Please see the `reference documentation 
`_
-at Apache TinkerPop for more information on usage.
+-
+Sample Traversals
+-
+
+The Gremlin language allows users to write highly expressive graph traversals 
and has a broad list of functions that
+cover a wide body of features. The `Reference Documentation 
`_
+describes these functions and other aspects of the TinkerPop ecosystem 
including some specifics on
+`Gremlin in Python 
`_ 
itself. Most of the

Review comment:
   to fix: use #gremlin-python here?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Documentation for JavaScript library is non-existent
> 
>
> Key: TINKERPOP-2392
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.4.7
>Reporter: James Sumners
>Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2392) Documentation for JavaScript library is non-existent

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

gugacavalieri commented on pull request #1321:
URL: https://github.com/apache/tinkerpop/pull/1321#issuecomment-683899119


   Looks like a big improvement :orange_heart: 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Documentation for JavaScript library is non-existent
> 
>
> Key: TINKERPOP-2392
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.4.7
>Reporter: James Sumners
>Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2392) Documentation for JavaScript library is non-existent

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

jsumners commented on pull request #1321:
URL: https://github.com/apache/tinkerpop/pull/1321#issuecomment-683860728


   I think these additions go a long way toward making the documentation 
clearer for secondary languages like JavaScript.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Documentation for JavaScript library is non-existent
> 
>
> Key: TINKERPOP-2392
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.4.7
>Reporter: James Sumners
>Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2392) Documentation for JavaScript library is non-existent

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

spmallette commented on pull request #1321:
URL: https://github.com/apache/tinkerpop/pull/1321#issuecomment-683852101


   @aboudreault if you have a moment to take a look at the python related doc 
changes to see if they would make sense to new python developer, that would be 
appreciated. 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Documentation for JavaScript library is non-existent
> 
>
> Key: TINKERPOP-2392
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.4.7
>Reporter: James Sumners
>Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2392) Documentation for JavaScript library is non-existent

2020-08-31 Thread ASF GitHub Bot (Jira)


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

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

spmallette opened a new pull request #1321:
URL: https://github.com/apache/tinkerpop/pull/1321


   https://issues.apache.org/jira/browse/TINKERPOP-2392
   
   This issue was about javascript but really might have applied to all GLVs. 
With the recent change of ae95dbe9c33b380555ee32716e56ec12b56c3f6c it seemed to 
make sense to expand this change to all GLVs and to improve upon it. I could 
have probably just CTR'd this in but thought it would be better to get some 
review on sample variety and syntax (as these changes will affect artifact 
repositories descriptions...nuget, pypi, npm...and I'm not sure there is a nice 
way to validate links/changes without a release deployment.
   
   VOTE +1



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Documentation for JavaScript library is non-existent
> 
>
> Key: TINKERPOP-2392
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.4.7
>Reporter: James Sumners
>Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)