You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/08/09 17:20:23 UTC
tinkerpop git commit: TINKERPOP-1342 Added documentation for
RequestOptions
Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1342 4f5558bca -> 046747b22
TINKERPOP-1342 Added documentation for RequestOptions
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/046747b2
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/046747b2
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/046747b2
Branch: refs/heads/TINKERPOP-1342
Commit: 046747b22956b92392795084c87638947b05fe7b
Parents: 4f5558b
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 9 13:19:55 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 9 13:19:55 2018 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 2 ++
docs/src/reference/gremlin-applications.asciidoc | 15 +++++++++++++++
docs/src/upgrade/release-3.4.x.asciidoc | 16 ++++++++++++++++
3 files changed, 33 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/046747b2/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 303d963..92fc9bd 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,8 @@ This release also includes changes from <<release-3-3-3, 3.3.3>>.
* Deprecated `Graph.io()` and related infrastructure.
* Bumped to Netty 4.1.25.
* Bumped to Spark 2.3.1.
+* Deprecated two `submit()`-related methods on the Java driver `Client` class.
+* Added `Client.submit()` overloads that accept per-request `RequestOptions`.
* Moved `Parameterizing` interface to the `org.apache.tinkerpop.gremlin.process.traversal.step` package with other marker interfaces of its type.
* Replaced `Parameterizing.addPropertyMutations()` with `Configuring.configure()`.
* Changed interface hierarchy for `Parameterizing` and `Mutating` interfaces as they are tightly related.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/046747b2/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 1a7de96..234bf3f 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -827,6 +827,21 @@ The above code demonstrates using the `TitanIoRegistry` which is an `IoRegistry`
what classes (from Titan in this case) to auto-register during serialization. Gremlin Server roughly uses this same
approach when it configures it's serializers, so using this same model will ensure compatibility when making requests.
+==== Per Request Settings
+
+There are a number of overloads to `Client.submit()` that accept a `RequestOptions` object. The `RequestOptions`
+provide a way to include options that are specific to the request made with the call to `submit()`. A good use-case for
+this feature is to set a per-request override to the `scriptEvaluationTimeout` so that it only applies to the current
+request.
+
+[source,java]
+----
+Cluster cluster = Cluster.open();
+Client client = cluster.connect();
+RequestOptions options = RequestOptions.build().timeout(500).create();
+List<Result> result = client.submit("g.V()", options).all().get();
+----
+
[[connecting-via-python]]
=== Connecting via Python
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/046747b2/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index 587e761..6f3531a 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -92,6 +92,22 @@ efficiencies there.
See: link:https://issues.apache.org/jira/browse/TINKERPOP-1996[TINKERPOP-1996],
link:http://tinkerpop.apache.org/docs/3.4.0/reference/#io-step[Reference Documentation]
+==== Per Request Options
+
+The Java driver now allows for various options to be set on a per-request basis via new overloads to `submit()` that
+accept `RequestOption` instances. A good use-case for this feature is to set a per-request override to the
+`scriptEvaluationTimeout` so that it only applies to the current request.
+
+[source,java]
+----
+Cluster cluster = Cluster.open();
+Client client = cluster.connect();
+RequestOptions options = RequestOptions.build().timeout(500).create();
+List<Result> result = client.submit("g.V()", options).all().get();
+----
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1342[TINKERPOP-1342]
+
==== Removal of Giraph Support
Support for Giraph has been removed as of this version. There were a number of reasons for this decision which were