[jira] [Created] (TINKERPOP-2056) Use NumberHelper in Compare

2018-10-02 Thread Daniel Kuppitz (JIRA)
Daniel Kuppitz created TINKERPOP-2056:
-

 Summary: Use NumberHelper in Compare
 Key: TINKERPOP-2056
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2056
 Project: TinkerPop
  Issue Type: Improvement
  Components: process
Affects Versions: 3.2.9
Reporter: Daniel Kuppitz
Assignee: Daniel Kuppitz


The {{Compare}} enum doesn't use {{NumberHelper}}. Instead, it converts numbers 
of differing types to {{BigDecimal}}s. That's pretty much the slowest thing we 
can do.



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


[jira] [Created] (TINKERPOP-2055) Provide support for special number cases like Infinity in GraphSON

2018-10-02 Thread stephen mallette (JIRA)
stephen mallette created TINKERPOP-2055:
---

 Summary: Provide support for special number cases like Infinity in 
GraphSON
 Key: TINKERPOP-2055
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2055
 Project: TinkerPop
  Issue Type: Improvement
  Components: io
Affects Versions: 3.2.9
Reporter: stephen mallette
Assignee: stephen mallette


GraphSON currently doesn't handle: {{Double.Nan}}, {{Double.NEGATIVE_INFINITY}} 
or {{Double.POSITIVE_INFINITY}} because it has a custom {{Double}} serializer 
that ignores those cases in GraphSON 2.0 and 3.0. Not going to try to solve 
this for 1.0.



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


[jira] [Commented] (TINKERPOP-2041) Text Predicates

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/944
  
I think we need to add `TextP` to the IO tests and provide an example in 
the related IO docs. I can do that tomorrow.


> Text Predicates
> ---
>
> Key: TINKERPOP-2041
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2041
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: Daniel Kuppitz
>Assignee: Daniel Kuppitz
>Priority: Major
>
> Provide these simple text predicates:
>  * {{startsWith}}
>  * {{endsWith}}
>  * {{contains}}



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


[GitHub] tinkerpop issue #944: TINKERPOP-2041 Text Predicates

2018-10-02 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/944
  
I think we need to add `TextP` to the IO tests and provide an example in 
the related IO docs. I can do that tomorrow.


---


[jira] [Commented] (TINKERPOP-2041) Text Predicates

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/944#discussion_r222065189
  
--- Diff: docs/src/reference/the-traversal.asciidoc ---
@@ -3356,24 +3356,32 @@ interface. Steps that allow for this type of 
modulation will explicitly state so
 [[a-note-on-predicates]]
 == A Note on Predicates
 
-A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. The
-provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
+A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. As of
+the relase of TinkerPop 3.4.0, Gremlin also supports simple text 
predicates, which only work on `String` values. The `TextP`
+text predicates extend the `P` predicates, but are specialized in that 
they are of the form `Function`.
+The provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
 <>-step, <>-step, etc.
 
 [width="100%",cols="3,15",options="header"]
 |=
 | Predicate | Description
-| `eq(object)` | Is the incoming object equal to the provided object?
-| `neq(object)` | Is the incoming object not equal to the provided object?
-| `lt(number)` | Is the incoming number less than the provided number?
-| `lte(number)` | Is the incoming number less than or equal to the 
provided number?
-| `gt(number)` | Is the incoming number greater than the provided number?
-| `gte(number)` | Is the incoming number greater than or equal to the 
provided number?
-| `inside(number,number)` | Is the incoming number greater than the first 
provided number and less than the second?
-| `outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
-| `between(number,number)` | Is the incoming number greater than or equal 
to the first provided number and less than the second?
-| `within(objects...)` | Is the incoming object in the array of provided 
objects?
-| `without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `P.eq(object)` | Is the incoming object equal to the provided object?
+| `P.neq(object)` | Is the incoming object not equal to the provided 
object?
+| `P.lt(number)` | Is the incoming number less than the provided number?
+| `P.lte(number)` | Is the incoming number less than or equal to the 
provided number?
+| `P.gt(number)` | Is the incoming number greater than the provided number?
+| `P.gte(number)` | Is the incoming number greater than or equal to the 
provided number?
+| `P.inside(number,number)` | Is the incoming number greater than the 
first provided number and less than the second?
+| `P.outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
+| `P.between(number,number)` | Is the incoming number greater than or 
equal to the first provided number and less than the second?
+| `P.within(objects...)` | Is the incoming object in the array of provided 
objects?
+| `P.without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `TextP.startsWith(string)` | Does the incoming `String` start with the 
provided `String`?
+| `TextP.endsWith(string)` | Does the incoming `String` end with the 
provided `String`?
+| `TextP.contains(string)` | Does the incoming `String` contain the 
provided `String`?
+| `TextP.startsNotWith(string)` | TODO: find a better name
--- End diff --

Sounds good to me, much better than what it is now.


> Text Predicates
> ---
>
> Key: TINKERPOP-2041
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2041
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: Daniel Kuppitz
>Assignee: Daniel Kuppitz
>Priority: Major
>
> Provide these simple text predicates:
>  * {{startsWith}}
>  * {{endsWith}}
>  * {{contains}}



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


[GitHub] tinkerpop pull request #944: TINKERPOP-2041 Text Predicates

2018-10-02 Thread dkuppitz
Github user dkuppitz commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/944#discussion_r222065189
  
--- Diff: docs/src/reference/the-traversal.asciidoc ---
@@ -3356,24 +3356,32 @@ interface. Steps that allow for this type of 
modulation will explicitly state so
 [[a-note-on-predicates]]
 == A Note on Predicates
 
-A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. The
-provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
+A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. As of
+the relase of TinkerPop 3.4.0, Gremlin also supports simple text 
predicates, which only work on `String` values. The `TextP`
+text predicates extend the `P` predicates, but are specialized in that 
they are of the form `Function`.
+The provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
 <>-step, <>-step, etc.
 
 [width="100%",cols="3,15",options="header"]
 |=
 | Predicate | Description
-| `eq(object)` | Is the incoming object equal to the provided object?
-| `neq(object)` | Is the incoming object not equal to the provided object?
-| `lt(number)` | Is the incoming number less than the provided number?
-| `lte(number)` | Is the incoming number less than or equal to the 
provided number?
-| `gt(number)` | Is the incoming number greater than the provided number?
-| `gte(number)` | Is the incoming number greater than or equal to the 
provided number?
-| `inside(number,number)` | Is the incoming number greater than the first 
provided number and less than the second?
-| `outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
-| `between(number,number)` | Is the incoming number greater than or equal 
to the first provided number and less than the second?
-| `within(objects...)` | Is the incoming object in the array of provided 
objects?
-| `without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `P.eq(object)` | Is the incoming object equal to the provided object?
+| `P.neq(object)` | Is the incoming object not equal to the provided 
object?
+| `P.lt(number)` | Is the incoming number less than the provided number?
+| `P.lte(number)` | Is the incoming number less than or equal to the 
provided number?
+| `P.gt(number)` | Is the incoming number greater than the provided number?
+| `P.gte(number)` | Is the incoming number greater than or equal to the 
provided number?
+| `P.inside(number,number)` | Is the incoming number greater than the 
first provided number and less than the second?
+| `P.outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
+| `P.between(number,number)` | Is the incoming number greater than or 
equal to the first provided number and less than the second?
+| `P.within(objects...)` | Is the incoming object in the array of provided 
objects?
+| `P.without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `TextP.startsWith(string)` | Does the incoming `String` start with the 
provided `String`?
+| `TextP.endsWith(string)` | Does the incoming `String` end with the 
provided `String`?
+| `TextP.contains(string)` | Does the incoming `String` contain the 
provided `String`?
+| `TextP.startsNotWith(string)` | TODO: find a better name
--- End diff --

Sounds good to me, much better than what it is now.


---


[jira] [Commented] (TINKERPOP-2041) Text Predicates

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/944#discussion_r222063944
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TextP.java
 ---
@@ -0,0 +1,107 @@
+/*
+ * 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.process.traversal;
+
+import java.util.function.BiPredicate;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
--- End diff --

Just needs some class javadoc - looks like you covered the methods pretty 
well.


> Text Predicates
> ---
>
> Key: TINKERPOP-2041
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2041
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: Daniel Kuppitz
>Assignee: Daniel Kuppitz
>Priority: Major
>
> Provide these simple text predicates:
>  * {{startsWith}}
>  * {{endsWith}}
>  * {{contains}}



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


[jira] [Commented] (TINKERPOP-2041) Text Predicates

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/944#discussion_r222063562
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
 ---
@@ -0,0 +1,123 @@
+/*
+ * 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.process.traversal;
+
+import java.util.function.BiPredicate;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public enum Text implements BiPredicate {
--- End diff --

Could you please complete all the javadoc on this class since it's public 
facing like `Compare` - I think you need all the `@since` tags on everything in 
here.


> Text Predicates
> ---
>
> Key: TINKERPOP-2041
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2041
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: Daniel Kuppitz
>Assignee: Daniel Kuppitz
>Priority: Major
>
> Provide these simple text predicates:
>  * {{startsWith}}
>  * {{endsWith}}
>  * {{contains}}



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


[GitHub] tinkerpop pull request #944: TINKERPOP-2041 Text Predicates

2018-10-02 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/944#discussion_r222063944
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TextP.java
 ---
@@ -0,0 +1,107 @@
+/*
+ * 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.process.traversal;
+
+import java.util.function.BiPredicate;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
--- End diff --

Just needs some class javadoc - looks like you covered the methods pretty 
well.


---


[GitHub] tinkerpop pull request #944: TINKERPOP-2041 Text Predicates

2018-10-02 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/944#discussion_r222063562
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
 ---
@@ -0,0 +1,123 @@
+/*
+ * 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.process.traversal;
+
+import java.util.function.BiPredicate;
+
+/**
+ * @author Daniel Kuppitz (http://gremlin.guru)
+ */
+public enum Text implements BiPredicate {
--- End diff --

Could you please complete all the javadoc on this class since it's public 
facing like `Compare` - I think you need all the `@since` tags on everything in 
here.


---


[jira] [Commented] (TINKERPOP-2041) Text Predicates

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/944#discussion_r222062939
  
--- Diff: docs/src/reference/the-traversal.asciidoc ---
@@ -3356,24 +3356,32 @@ interface. Steps that allow for this type of 
modulation will explicitly state so
 [[a-note-on-predicates]]
 == A Note on Predicates
 
-A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. The
-provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
+A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. As of
+the relase of TinkerPop 3.4.0, Gremlin also supports simple text 
predicates, which only work on `String` values. The `TextP`
+text predicates extend the `P` predicates, but are specialized in that 
they are of the form `Function`.
+The provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
 <>-step, <>-step, etc.
 
 [width="100%",cols="3,15",options="header"]
 |=
 | Predicate | Description
-| `eq(object)` | Is the incoming object equal to the provided object?
-| `neq(object)` | Is the incoming object not equal to the provided object?
-| `lt(number)` | Is the incoming number less than the provided number?
-| `lte(number)` | Is the incoming number less than or equal to the 
provided number?
-| `gt(number)` | Is the incoming number greater than the provided number?
-| `gte(number)` | Is the incoming number greater than or equal to the 
provided number?
-| `inside(number,number)` | Is the incoming number greater than the first 
provided number and less than the second?
-| `outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
-| `between(number,number)` | Is the incoming number greater than or equal 
to the first provided number and less than the second?
-| `within(objects...)` | Is the incoming object in the array of provided 
objects?
-| `without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `P.eq(object)` | Is the incoming object equal to the provided object?
+| `P.neq(object)` | Is the incoming object not equal to the provided 
object?
+| `P.lt(number)` | Is the incoming number less than the provided number?
+| `P.lte(number)` | Is the incoming number less than or equal to the 
provided number?
+| `P.gt(number)` | Is the incoming number greater than the provided number?
+| `P.gte(number)` | Is the incoming number greater than or equal to the 
provided number?
+| `P.inside(number,number)` | Is the incoming number greater than the 
first provided number and less than the second?
+| `P.outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
+| `P.between(number,number)` | Is the incoming number greater than or 
equal to the first provided number and less than the second?
+| `P.within(objects...)` | Is the incoming object in the array of provided 
objects?
+| `P.without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `TextP.startsWith(string)` | Does the incoming `String` start with the 
provided `String`?
+| `TextP.endsWith(string)` | Does the incoming `String` end with the 
provided `String`?
+| `TextP.contains(string)` | Does the incoming `String` contain the 
provided `String`?
+| `TextP.startsNotWith(string)` | TODO: find a better name
--- End diff --

maybe we should put all the "nots" together so that:

* `notStartingWith()`
* `notEndingWith()`
* `notContaining()`

They seem to read a bit less awkwardly when I say them out loud. if we 
wanted we could make it all consistent and be like:

* `startingWith()`
* `endingWith()`
* `containing()`
* `notStartingWith()`
* `notEndingWith()`
* `notContaining()`

but maybe not necessary???


> Text Predicates
> ---
>
> Key: TINKERPOP-2041
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2041
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: Daniel Kuppitz
>Assignee: Daniel Kuppitz
>Priority: Major
>
> Provide these simple text predicates:
>  * {{startsWith}}
>  * {{endsWith}}
>  * {{contains}}



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


[GitHub] tinkerpop pull request #944: TINKERPOP-2041 Text Predicates

2018-10-02 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/944#discussion_r222062939
  
--- Diff: docs/src/reference/the-traversal.asciidoc ---
@@ -3356,24 +3356,32 @@ interface. Steps that allow for this type of 
modulation will explicitly state so
 [[a-note-on-predicates]]
 == A Note on Predicates
 
-A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. The
-provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
+A `P` is a predicate of the form `Function`. That is, 
given some object, return true or false. As of
+the relase of TinkerPop 3.4.0, Gremlin also supports simple text 
predicates, which only work on `String` values. The `TextP`
+text predicates extend the `P` predicates, but are specialized in that 
they are of the form `Function`.
+The provided predicates are outlined in the table below and are used in 
various steps such as <>-step,
 <>-step, <>-step, etc.
 
 [width="100%",cols="3,15",options="header"]
 |=
 | Predicate | Description
-| `eq(object)` | Is the incoming object equal to the provided object?
-| `neq(object)` | Is the incoming object not equal to the provided object?
-| `lt(number)` | Is the incoming number less than the provided number?
-| `lte(number)` | Is the incoming number less than or equal to the 
provided number?
-| `gt(number)` | Is the incoming number greater than the provided number?
-| `gte(number)` | Is the incoming number greater than or equal to the 
provided number?
-| `inside(number,number)` | Is the incoming number greater than the first 
provided number and less than the second?
-| `outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
-| `between(number,number)` | Is the incoming number greater than or equal 
to the first provided number and less than the second?
-| `within(objects...)` | Is the incoming object in the array of provided 
objects?
-| `without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `P.eq(object)` | Is the incoming object equal to the provided object?
+| `P.neq(object)` | Is the incoming object not equal to the provided 
object?
+| `P.lt(number)` | Is the incoming number less than the provided number?
+| `P.lte(number)` | Is the incoming number less than or equal to the 
provided number?
+| `P.gt(number)` | Is the incoming number greater than the provided number?
+| `P.gte(number)` | Is the incoming number greater than or equal to the 
provided number?
+| `P.inside(number,number)` | Is the incoming number greater than the 
first provided number and less than the second?
+| `P.outside(number,number)` | Is the incoming number less than the first 
provided number or greater than the second?
+| `P.between(number,number)` | Is the incoming number greater than or 
equal to the first provided number and less than the second?
+| `P.within(objects...)` | Is the incoming object in the array of provided 
objects?
+| `P.without(objects...)` | Is the incoming object not in the array of the 
provided objects?
+| `TextP.startsWith(string)` | Does the incoming `String` start with the 
provided `String`?
+| `TextP.endsWith(string)` | Does the incoming `String` end with the 
provided `String`?
+| `TextP.contains(string)` | Does the incoming `String` contain the 
provided `String`?
+| `TextP.startsNotWith(string)` | TODO: find a better name
--- End diff --

maybe we should put all the "nots" together so that:

* `notStartingWith()`
* `notEndingWith()`
* `notContaining()`

They seem to read a bit less awkwardly when I say them out loud. if we 
wanted we could make it all consistent and be like:

* `startingWith()`
* `endingWith()`
* `containing()`
* `notStartingWith()`
* `notEndingWith()`
* `notContaining()`

but maybe not necessary???


---


[jira] [Commented] (TINKERPOP-2037) Remove unused groovy-sql dependency

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/946
  
Nice cleanup work on all this groovy stuff - thanks

VOTE +1


> Remove unused groovy-sql dependency
> ---
>
> Key: TINKERPOP-2037
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2037
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver
>Reporter: Robert Dale
>Assignee: Robert Dale
>Priority: Trivial
> Fix For: 3.4.0
>
>
> See thread - 
> https://lists.apache.org/thread.html/da6008600e76d828f435cba7d4f7d9c0334e45e854dab8a9ad967232@%3Cdev.tinkerpop.apache.org%3E



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


[GitHub] tinkerpop issue #946: TINKERPOP-2037 removed groovy-sql

2018-10-02 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/946
  
Nice cleanup work on all this groovy stuff - thanks

VOTE +1


---


[GitHub] tinkerpop pull request #946: TINKERPOP-2037 removed groovy-sql

2018-10-02 Thread robertdale
GitHub user robertdale opened a pull request:

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

TINKERPOP-2037 removed groovy-sql


Removed unused groovy-sql dependency.

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

`sh docker/build.sh -i -t` BUILD SUCCESS

VOTE +1


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

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

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

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


commit 24ca28e08fa8a672f64c93fe95e5ae9ffa06dbee
Author: Robert Dale 
Date:   2018-10-02T16:24:31Z

TINKERPOP-2037 removed groovy-sql




---


[jira] [Commented] (TINKERPOP-2037) Remove unused groovy-sql dependency

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

GitHub user robertdale opened a pull request:

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

TINKERPOP-2037 removed groovy-sql


Removed unused groovy-sql dependency.

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

`sh docker/build.sh -i -t` BUILD SUCCESS

VOTE +1


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

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

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

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


commit 24ca28e08fa8a672f64c93fe95e5ae9ffa06dbee
Author: Robert Dale 
Date:   2018-10-02T16:24:31Z

TINKERPOP-2037 removed groovy-sql




> Remove unused groovy-sql dependency
> ---
>
> Key: TINKERPOP-2037
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2037
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver
>Reporter: Robert Dale
>Assignee: Robert Dale
>Priority: Trivial
> Fix For: 3.4.0
>
>
> See thread - 
> https://lists.apache.org/thread.html/da6008600e76d828f435cba7d4f7d9c0334e45e854dab8a9ad967232@%3Cdev.tinkerpop.apache.org%3E



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


[jira] [Commented] (TINKERPOP-2053) Provider OptionsStrategy for traversal configurations

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

GitHub user spmallette opened a pull request:

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

TINKERPOP-2053 Support for OptionsStrategy

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

`OptionsStrategy` lets users pass arbitrary configurations at a traversal 
level. At first I thought this might be a first class object, but decided 
instead to try it out as a `TraversalStrategy`. In that way it was implemented 
with little overhead. If it becomes useful and popular in the future then we 
can consider making it more integrated into the `TraversalSource` and 
`Traversal` itself. I didn't implement this for javascript because I don't 
think we have all the infrastructure there for supporting `TraversalStrategy` 
stuff yet. 

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

VOTE +1

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

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

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

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


commit 91573d5c7d44944186a9cd11ce880dec32caff47
Author: Stephen Mallette 
Date:   2018-10-01T20:02:46Z

TINKERPOP-2053 Added OptionsStrategy

Included a test in TinkerGraph rather than the main test suite because the 
test really isn't easily asserted without a custom step that reads the 
OptionsStrategy.

commit 16c324e67686b5c7dbebe941928b56113048d21a
Author: Stephen Mallette 
Date:   2018-10-02T15:44:22Z

TINKERPOP-2053 Python support for OptionsStrategy

commit 334ea8ae9a1c1168f285d43afcb9b71c836febe7
Author: Stephen Mallette 
Date:   2018-10-02T16:42:49Z

TINKERPOP-2053 Added OptionsStrategy support for .NET

commit 9b155132eb80efec52a34bf912ee2e247bc005b5
Author: Stephen Mallette 
Date:   2018-10-02T17:55:21Z

TINKERPOP-2053 Added upgrade docs for OptionsStrategy




> Provider OptionsStrategy for traversal configurations
> -
>
> Key: TINKERPOP-2053
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2053
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.3.3
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
> Fix For: 3.4.0
>
>
> {{OptionsStrategy}} will make it so that users can set traversal-wide options 
> that can be accessed by steps or other classes that might interact with a 
> {{Traversal}}. 



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


[GitHub] tinkerpop pull request #945: TINKERPOP-2053 Support for OptionsStrategy

2018-10-02 Thread spmallette
GitHub user spmallette opened a pull request:

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

TINKERPOP-2053 Support for OptionsStrategy

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

`OptionsStrategy` lets users pass arbitrary configurations at a traversal 
level. At first I thought this might be a first class object, but decided 
instead to try it out as a `TraversalStrategy`. In that way it was implemented 
with little overhead. If it becomes useful and popular in the future then we 
can consider making it more integrated into the `TraversalSource` and 
`Traversal` itself. I didn't implement this for javascript because I don't 
think we have all the infrastructure there for supporting `TraversalStrategy` 
stuff yet. 

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

VOTE +1

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

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

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

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


commit 91573d5c7d44944186a9cd11ce880dec32caff47
Author: Stephen Mallette 
Date:   2018-10-01T20:02:46Z

TINKERPOP-2053 Added OptionsStrategy

Included a test in TinkerGraph rather than the main test suite because the 
test really isn't easily asserted without a custom step that reads the 
OptionsStrategy.

commit 16c324e67686b5c7dbebe941928b56113048d21a
Author: Stephen Mallette 
Date:   2018-10-02T15:44:22Z

TINKERPOP-2053 Python support for OptionsStrategy

commit 334ea8ae9a1c1168f285d43afcb9b71c836febe7
Author: Stephen Mallette 
Date:   2018-10-02T16:42:49Z

TINKERPOP-2053 Added OptionsStrategy support for .NET

commit 9b155132eb80efec52a34bf912ee2e247bc005b5
Author: Stephen Mallette 
Date:   2018-10-02T17:55:21Z

TINKERPOP-2053 Added upgrade docs for OptionsStrategy




---


[jira] [Created] (TINKERPOP-2054) Support TraversalStrategy specification in gremlin-javascript

2018-10-02 Thread stephen mallette (JIRA)
stephen mallette created TINKERPOP-2054:
---

 Summary: Support TraversalStrategy specification in 
gremlin-javascript
 Key: TINKERPOP-2054
 URL: https://issues.apache.org/jira/browse/TINKERPOP-2054
 Project: TinkerPop
  Issue Type: Improvement
  Components: javascript
Affects Versions: 3.2.9
Reporter: stephen mallette


As best I can tell, I don't think we have ways to specify {{TraversalStrategy}} 
instances like {{SubgraphStrategy}} with javascript.



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


[jira] [Updated] (TINKERPOP-2048) Java Driver: Support custom headers in WebSocket request

2018-10-02 Thread stephen mallette (JIRA)


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

stephen mallette updated TINKERPOP-2048:

Affects Version/s: 3.2.9
  Component/s: driver

> Java Driver: Support custom headers in WebSocket request
> 
>
> Key: TINKERPOP-2048
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2048
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver
>Affects Versions: 3.2.9
>Reporter: Jorge Bay
>Priority: Major
>
> Similar to TINKERPOP-2035, we should allow users to set custom request 
> headers in WebSocket request.



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


[jira] [Commented] (TINKERPOP-2044) Cannot reconnect to Azure cosmos host that becomes available again

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/943
  
VOTE +1


> Cannot reconnect to Azure cosmos host that becomes available again
> --
>
> Key: TINKERPOP-2044
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2044
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.3
>Reporter: Dantis P S
>Assignee: stephen mallette
>Priority: Major
>
> If a Azure Cosmos Gremlin host goes down and if it becomes available again, 
> the tinkerpop3 java driver cannot reconnect to it. 
> Sample code is available at [https://github.com/cancure/tinkerpopcosmos]
>  
> These are the steps to reproduce - 
> 1) Start the application after providing proper connection details in 
> remote.yaml file.
> 2) Call the end point POST [http://localhost:8080/query.] Pass a valid 
> gremlin query as HTTP body E.g. g.V(1).id()
> 3) Disconnect computer from internet. 
> 4) Do step 2.
> 5) Reconnect computer to the internet.
> 6) Do step 2. 
> Any query executed from this point onwards gets the error - 
> "java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out 
> while waiting for an available host - check the client configuration and 
> connectivity to the server if this message persists".
>  
> The issue seems to be coming from 
> org.apache.tinkerpop.gremlin.driver.ConnectionPool.java. In line #403, the 
> gremlin query used for ping message is '' (Empty string in single quotes). 
> final RequestMessage ping = 
> RequestMessage.build(Tokens.OPS_EVAL).add(Tokens.ARGS_GREMLIN, "''").create();
>  
> Cosmos server returns an error saying that the gremlin query's grammar is 
> incorrect. Because of this error the rest of the lines of the method does not 
> get executed.
>  
> Fix will be to use a gremlin query which is valid for all supported graph DBs.
>  



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


[GitHub] tinkerpop issue #943: TINKERPOP-2044 Configurable traversal to validate host...

2018-10-02 Thread dkuppitz
Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/943
  
VOTE +1


---


[jira] [Closed] (TINKERPOP-2045) Remove non-indy groovy dependencies

2018-10-02 Thread stephen mallette (JIRA)


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

stephen mallette closed TINKERPOP-2045.
---
   Resolution: Done
Fix Version/s: 3.2.10
   3.3.4
   3.4.0

> Remove non-indy groovy dependencies
> ---
>
> Key: TINKERPOP-2045
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2045
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver, groovy
>Affects Versions: 3.3.3, 3.2.9
>Reporter: Robert Dale
>Assignee: Robert Dale
>Priority: Minor
> Fix For: 3.4.0, 3.3.4, 3.2.10
>
>
> Console and Server include conflicting core groovy dependencies of indy and 
> non-indy jars. Depending on the shell's sort order, the user may or may not 
> get the invokedynamic improvement.  
> See also 
> [DISCUSS|https://lists.apache.org/thread.html/de2c6dcfcc26fcfea6ce787d79f51f473390b24c74dbbff203fec67b@%3Cdev.tinkerpop.apache.org%3E]



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


[GitHub] tinkerpop issue #920: optmizes collection copy with Collections addAll

2018-10-02 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/920
  
VOTE +1


---


[jira] [Commented] (TINKERPOP-2044) Cannot reconnect to Azure cosmos host that becomes available again

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/943#discussion_r221908780
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java 
---
@@ -243,6 +243,8 @@ public static Settings from(final Configuration conf) {
 if (connectionPoolConf.containsKey("keepAliveInterval"))
 cpSettings.keepAliveInterval = 
connectionPoolConf.getLong("keepAliveInterval");
 
+if (connectionPoolConf.containsKey("validationRequest"))
+cpSettings.validationRequest = 
connectionPoolConf.getList("validationRequest").stream().map(Object::toString).collect(Collectors.joining(","));
--- End diff --

I thought that period as with the script `g.inject()` was being treated as 
a delimiter for Apache Configuration, but I can't get the test to fail anymore, 
so I must have been mistaken in what I was seeing. changing it.


> Cannot reconnect to Azure cosmos host that becomes available again
> --
>
> Key: TINKERPOP-2044
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2044
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.3
>Reporter: Dantis P S
>Assignee: stephen mallette
>Priority: Major
>
> If a Azure Cosmos Gremlin host goes down and if it becomes available again, 
> the tinkerpop3 java driver cannot reconnect to it. 
> Sample code is available at [https://github.com/cancure/tinkerpopcosmos]
>  
> These are the steps to reproduce - 
> 1) Start the application after providing proper connection details in 
> remote.yaml file.
> 2) Call the end point POST [http://localhost:8080/query.] Pass a valid 
> gremlin query as HTTP body E.g. g.V(1).id()
> 3) Disconnect computer from internet. 
> 4) Do step 2.
> 5) Reconnect computer to the internet.
> 6) Do step 2. 
> Any query executed from this point onwards gets the error - 
> "java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out 
> while waiting for an available host - check the client configuration and 
> connectivity to the server if this message persists".
>  
> The issue seems to be coming from 
> org.apache.tinkerpop.gremlin.driver.ConnectionPool.java. In line #403, the 
> gremlin query used for ping message is '' (Empty string in single quotes). 
> final RequestMessage ping = 
> RequestMessage.build(Tokens.OPS_EVAL).add(Tokens.ARGS_GREMLIN, "''").create();
>  
> Cosmos server returns an error saying that the gremlin query's grammar is 
> incorrect. Because of this error the rest of the lines of the method does not 
> get executed.
>  
> Fix will be to use a gremlin query which is valid for all supported graph DBs.
>  



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


[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...

2018-10-02 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/943#discussion_r221908780
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java 
---
@@ -243,6 +243,8 @@ public static Settings from(final Configuration conf) {
 if (connectionPoolConf.containsKey("keepAliveInterval"))
 cpSettings.keepAliveInterval = 
connectionPoolConf.getLong("keepAliveInterval");
 
+if (connectionPoolConf.containsKey("validationRequest"))
+cpSettings.validationRequest = 
connectionPoolConf.getList("validationRequest").stream().map(Object::toString).collect(Collectors.joining(","));
--- End diff --

I thought that period as with the script `g.inject()` was being treated as 
a delimiter for Apache Configuration, but I can't get the test to fail anymore, 
so I must have been mistaken in what I was seeing. changing it.


---


[jira] [Commented] (TINKERPOP-2044) Cannot reconnect to Azure cosmos host that becomes available again

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/943#discussion_r221908735
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java 
---
@@ -575,6 +585,8 @@ SslContext createSSLContext() throws Exception {
 private String trustStore = null;
 private String trustStorePassword = null;
 private String keyStoreType = null;
+private String validationRequest = "''";
+private boolean useBytecodeForValidation = false;
--- End diff --

Thought i got them all - fixed.


> Cannot reconnect to Azure cosmos host that becomes available again
> --
>
> Key: TINKERPOP-2044
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2044
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.3
>Reporter: Dantis P S
>Assignee: stephen mallette
>Priority: Major
>
> If a Azure Cosmos Gremlin host goes down and if it becomes available again, 
> the tinkerpop3 java driver cannot reconnect to it. 
> Sample code is available at [https://github.com/cancure/tinkerpopcosmos]
>  
> These are the steps to reproduce - 
> 1) Start the application after providing proper connection details in 
> remote.yaml file.
> 2) Call the end point POST [http://localhost:8080/query.] Pass a valid 
> gremlin query as HTTP body E.g. g.V(1).id()
> 3) Disconnect computer from internet. 
> 4) Do step 2.
> 5) Reconnect computer to the internet.
> 6) Do step 2. 
> Any query executed from this point onwards gets the error - 
> "java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out 
> while waiting for an available host - check the client configuration and 
> connectivity to the server if this message persists".
>  
> The issue seems to be coming from 
> org.apache.tinkerpop.gremlin.driver.ConnectionPool.java. In line #403, the 
> gremlin query used for ping message is '' (Empty string in single quotes). 
> final RequestMessage ping = 
> RequestMessage.build(Tokens.OPS_EVAL).add(Tokens.ARGS_GREMLIN, "''").create();
>  
> Cosmos server returns an error saying that the gremlin query's grammar is 
> incorrect. Because of this error the rest of the lines of the method does not 
> get executed.
>  
> Fix will be to use a gremlin query which is valid for all supported graph DBs.
>  



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


[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...

2018-10-02 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/943#discussion_r221908735
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java 
---
@@ -575,6 +585,8 @@ SslContext createSSLContext() throws Exception {
 private String trustStore = null;
 private String trustStorePassword = null;
 private String keyStoreType = null;
+private String validationRequest = "''";
+private boolean useBytecodeForValidation = false;
--- End diff --

Thought i got them all - fixed.


---


[jira] [Commented] (TINKERPOP-2044) Cannot reconnect to Azure cosmos host that becomes available again

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/943#discussion_r221859065
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java 
---
@@ -243,6 +243,8 @@ public static Settings from(final Configuration conf) {
 if (connectionPoolConf.containsKey("keepAliveInterval"))
 cpSettings.keepAliveInterval = 
connectionPoolConf.getLong("keepAliveInterval");
 
+if (connectionPoolConf.containsKey("validationRequest"))
+cpSettings.validationRequest = 
connectionPoolConf.getList("validationRequest").stream().map(Object::toString).collect(Collectors.joining(","));
--- End diff --

Why is this `getList()` instead of `getString()`?


> Cannot reconnect to Azure cosmos host that becomes available again
> --
>
> Key: TINKERPOP-2044
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2044
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.3
>Reporter: Dantis P S
>Assignee: stephen mallette
>Priority: Major
>
> If a Azure Cosmos Gremlin host goes down and if it becomes available again, 
> the tinkerpop3 java driver cannot reconnect to it. 
> Sample code is available at [https://github.com/cancure/tinkerpopcosmos]
>  
> These are the steps to reproduce - 
> 1) Start the application after providing proper connection details in 
> remote.yaml file.
> 2) Call the end point POST [http://localhost:8080/query.] Pass a valid 
> gremlin query as HTTP body E.g. g.V(1).id()
> 3) Disconnect computer from internet. 
> 4) Do step 2.
> 5) Reconnect computer to the internet.
> 6) Do step 2. 
> Any query executed from this point onwards gets the error - 
> "java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out 
> while waiting for an available host - check the client configuration and 
> connectivity to the server if this message persists".
>  
> The issue seems to be coming from 
> org.apache.tinkerpop.gremlin.driver.ConnectionPool.java. In line #403, the 
> gremlin query used for ping message is '' (Empty string in single quotes). 
> final RequestMessage ping = 
> RequestMessage.build(Tokens.OPS_EVAL).add(Tokens.ARGS_GREMLIN, "''").create();
>  
> Cosmos server returns an error saying that the gremlin query's grammar is 
> incorrect. Because of this error the rest of the lines of the method does not 
> get executed.
>  
> Fix will be to use a gremlin query which is valid for all supported graph DBs.
>  



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


[jira] [Commented] (TINKERPOP-2044) Cannot reconnect to Azure cosmos host that becomes available again

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

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

https://github.com/apache/tinkerpop/pull/943#discussion_r221858009
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java 
---
@@ -575,6 +585,8 @@ SslContext createSSLContext() throws Exception {
 private String trustStore = null;
 private String trustStorePassword = null;
 private String keyStoreType = null;
+private String validationRequest = "''";
+private boolean useBytecodeForValidation = false;
--- End diff --

`useBytecodeForValidation` was added but doesn't appear to be used anywhere 
else.


> Cannot reconnect to Azure cosmos host that becomes available again
> --
>
> Key: TINKERPOP-2044
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2044
> Project: TinkerPop
>  Issue Type: Bug
>  Components: driver
>Affects Versions: 3.3.3
>Reporter: Dantis P S
>Assignee: stephen mallette
>Priority: Major
>
> If a Azure Cosmos Gremlin host goes down and if it becomes available again, 
> the tinkerpop3 java driver cannot reconnect to it. 
> Sample code is available at [https://github.com/cancure/tinkerpopcosmos]
>  
> These are the steps to reproduce - 
> 1) Start the application after providing proper connection details in 
> remote.yaml file.
> 2) Call the end point POST [http://localhost:8080/query.] Pass a valid 
> gremlin query as HTTP body E.g. g.V(1).id()
> 3) Disconnect computer from internet. 
> 4) Do step 2.
> 5) Reconnect computer to the internet.
> 6) Do step 2. 
> Any query executed from this point onwards gets the error - 
> "java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out 
> while waiting for an available host - check the client configuration and 
> connectivity to the server if this message persists".
>  
> The issue seems to be coming from 
> org.apache.tinkerpop.gremlin.driver.ConnectionPool.java. In line #403, the 
> gremlin query used for ping message is '' (Empty string in single quotes). 
> final RequestMessage ping = 
> RequestMessage.build(Tokens.OPS_EVAL).add(Tokens.ARGS_GREMLIN, "''").create();
>  
> Cosmos server returns an error saying that the gremlin query's grammar is 
> incorrect. Because of this error the rest of the lines of the method does not 
> get executed.
>  
> Fix will be to use a gremlin query which is valid for all supported graph DBs.
>  



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


[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...

2018-10-02 Thread robertdale
Github user robertdale commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/943#discussion_r221858009
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java 
---
@@ -575,6 +585,8 @@ SslContext createSSLContext() throws Exception {
 private String trustStore = null;
 private String trustStorePassword = null;
 private String keyStoreType = null;
+private String validationRequest = "''";
+private boolean useBytecodeForValidation = false;
--- End diff --

`useBytecodeForValidation` was added but doesn't appear to be used anywhere 
else.


---


[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...

2018-10-02 Thread robertdale
Github user robertdale commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/943#discussion_r221859065
  
--- Diff: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java 
---
@@ -243,6 +243,8 @@ public static Settings from(final Configuration conf) {
 if (connectionPoolConf.containsKey("keepAliveInterval"))
 cpSettings.keepAliveInterval = 
connectionPoolConf.getLong("keepAliveInterval");
 
+if (connectionPoolConf.containsKey("validationRequest"))
+cpSettings.validationRequest = 
connectionPoolConf.getList("validationRequest").stream().map(Object::toString).collect(Collectors.joining(","));
--- End diff --

Why is this `getList()` instead of `getString()`?


---


[jira] [Commented] (TINKERPOP-2049) Single argument with() overload

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/942
  
VOTE +1


> Single argument with() overload
> ---
>
> Key: TINKERPOP-2049
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2049
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.0
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
> Fix For: 3.4.0
>
>
> Add {{with(k)}} which is equivalent of {{with(k, true}}}.



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


[GitHub] tinkerpop issue #942: TINKERPOP-2049 Added with(k) overload

2018-10-02 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/942
  
VOTE +1


---


[jira] [Commented] (TINKERPOP-2040) Improve flexibility of GroovyTranslator to handle custom types

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/941
  
VOTE +1


> Improve flexibility of GroovyTranslator to handle custom types
> --
>
> Key: TINKERPOP-2040
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2040
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: groovy
>Affects Versions: 3.2.9
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Major
>
> {{GroovyTranslator}} only handles a set body of types. If for some reason 
> however an object is passed to it in the traversal that it doesn't know how 
> to properly handle you could get an invalid groovy string. It would be good 
> if it could not only handle new types but also override existing ones (not 
> sure why an override would be needed, but does't seem like a wrong thing to 
> allow).
> This change is slightly bigger than {{GroovyTranslator}} though because 
> however the override will take place it will need to be possible to use it 
> within the script engine somehow and right now it is initialized statically.



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


[GitHub] tinkerpop issue #941: TINKERPOP-2040 Improve flexibility of GroovyTranslator...

2018-10-02 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/941
  
VOTE +1


---


[jira] [Commented] (TINKERPOP-2045) Remove non-indy groovy dependencies

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

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

Github user asfgit closed the pull request at:

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


> Remove non-indy groovy dependencies
> ---
>
> Key: TINKERPOP-2045
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2045
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: driver, groovy
>Affects Versions: 3.3.3, 3.2.9
>Reporter: Robert Dale
>Assignee: Robert Dale
>Priority: Minor
>
> Console and Server include conflicting core groovy dependencies of indy and 
> non-indy jars. Depending on the shell's sort order, the user may or may not 
> get the invokedynamic improvement.  
> See also 
> [DISCUSS|https://lists.apache.org/thread.html/de2c6dcfcc26fcfea6ce787d79f51f473390b24c74dbbff203fec67b@%3Cdev.tinkerpop.apache.org%3E]



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


[GitHub] tinkerpop pull request #939: TINKERPOP-2045 removed duplicate non-indy groov...

2018-10-02 Thread asfgit
Github user asfgit closed the pull request at:

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


---