You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by spmallette <gi...@git.apache.org> on 2018/09/28 20:22:19 UTC
[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...
GitHub user spmallette opened a pull request:
https://github.com/apache/tinkerpop/pull/943
TINKERPOP-2044 Configurable traversal to validate host connectivity.
https://issues.apache.org/jira/browse/TINKERPOP-2044
The user can now configure the script used to validate the operations of the remote.
```text
Cluster cluster = Cluster.build().validationRequest("g.inject()").create()
```
Builds with `mvn clean install -pl gremlin-driver && mvn verify -pl gremlin-server -DskipIntegrationTests=false`
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-2044
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/943.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 #943
----
commit bd1760f56a1e70cc49f4129a367c60e748aa54ad
Author: Stephen Mallette <sp...@...>
Date: 2018-09-28T19:54:30Z
TINKERPOP-2044 Configurable traversal to validate host connectivity.
----
---
[GitHub] tinkerpop issue #943: TINKERPOP-2044 Configurable traversal to validate host...
Posted by robertdale <gi...@git.apache.org>.
Github user robertdale commented on the issue:
https://github.com/apache/tinkerpop/pull/943
VOTE +1
---
[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...
Posted by robertdale <gi...@git.apache.org>.
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...
Posted by spmallette <gi...@git.apache.org>.
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.
---
[GitHub] tinkerpop issue #943: TINKERPOP-2044 Configurable traversal to validate host...
Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on the issue:
https://github.com/apache/tinkerpop/pull/943
VOTE +1
---
[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...
Posted by spmallette <gi...@git.apache.org>.
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.
---
[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...
Posted by robertdale <gi...@git.apache.org>.
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()`?
---
[GitHub] tinkerpop pull request #943: TINKERPOP-2044 Configurable traversal to valida...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/tinkerpop/pull/943
---