Commit 927bef50 authored by Rostislav Vatolin [SLB]'s avatar Rostislav Vatolin [SLB] Committed by Jason
Browse files

upgrade version of gremlin driver

reduce keep alive time from 3m to 30 sec
parent 00f3c34a
...@@ -621,7 +621,6 @@ The following software have components provided under the terms of this license: ...@@ -621,7 +621,6 @@ The following software have components provided under the terms of this license:
- Project Lombok (from https://projectlombok.org) - Project Lombok (from https://projectlombok.org)
- SLF4J API Module (from http://www.slf4j.org) - SLF4J API Module (from http://www.slf4j.org)
- Spongy Castle (from http://rtyley.github.io/spongycastle/) - Spongy Castle (from http://rtyley.github.io/spongycastle/)
- Spring Data Gremlin (from https://github.com/Microsoft/spring-data-gremlin)
- Spring Data for Azure Cosmos DB SQL API (from https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos) - Spring Data for Azure Cosmos DB SQL API (from https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos)
- adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) - adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java)
- jbcrypt (from http://www.mindrot.org/) - jbcrypt (from http://www.mindrot.org/)
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
<reactor.core.version>3.3.0.RELEASE</reactor.core.version> <reactor.core.version>3.3.0.RELEASE</reactor.core.version>
<springfox-version>2.7.0</springfox-version> <springfox-version>2.7.0</springfox-version>
<tomcat-embed-core.version>9.0.37</tomcat-embed-core.version> <tomcat-embed-core.version>9.0.37</tomcat-embed-core.version>
<gremlin.version>3.4.8</gremlin.version> <gremlin.version>3.4.10</gremlin.version>
<spring.data.gremlin.version>2.3.0</spring.data.gremlin.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -94,11 +93,6 @@ ...@@ -94,11 +93,6 @@
<artifactId>gremlin-driver</artifactId> <artifactId>gremlin-driver</artifactId>
<version>${gremlin.version}</version> <version>${gremlin.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.microsoft.spring.data.gremlin</groupId>
<artifactId>spring-data-gremlin</artifactId>
<version>${spring.data.gremlin.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.tinkerpop</groupId> <groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-groovy</artifactId> <artifactId>gremlin-groovy</artifactId>
......
...@@ -7,10 +7,10 @@ import org.apache.tinkerpop.gremlin.driver.Result; ...@@ -7,10 +7,10 @@ import org.apache.tinkerpop.gremlin.driver.Result;
import org.apache.tinkerpop.gremlin.driver.ResultSet; import org.apache.tinkerpop.gremlin.driver.ResultSet;
import org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection; import org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection;
import org.apache.tinkerpop.gremlin.driver.ser.Serializers; import org.apache.tinkerpop.gremlin.driver.ser.Serializers;
import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyTranslator;
import org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.translator.GroovyTranslator;
import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.opengroup.osdu.core.common.model.http.AppException; import org.opengroup.osdu.core.common.model.http.AppException;
...@@ -32,6 +32,7 @@ import java.util.concurrent.ExecutionException; ...@@ -32,6 +32,7 @@ import java.util.concurrent.ExecutionException;
@RequiredArgsConstructor @RequiredArgsConstructor
public class ClusterGremlinConnector implements GremlinConnector { public class ClusterGremlinConnector implements GremlinConnector {
private static final int MAX_CONTENT_LENGTH = 65536; private static final int MAX_CONTENT_LENGTH = 65536;
private static final long KEEP_ALIVE_TIME = 30000;
private static final int MAX_IN_PROCESS = 16; private static final int MAX_IN_PROCESS = 16;
private static final String TRAVERSAL_SUBMIT_ERROR_MESSAGE = "Error submitting traversal"; private static final String TRAVERSAL_SUBMIT_ERROR_MESSAGE = "Error submitting traversal";
private static final String RETRIEVING_RESULT_SET_ERROR_MESSAGE = "Error retrieving ResultSet object"; private static final String RETRIEVING_RESULT_SET_ERROR_MESSAGE = "Error retrieving ResultSet object";
...@@ -126,6 +127,7 @@ public class ClusterGremlinConnector implements GremlinConnector { ...@@ -126,6 +127,7 @@ public class ClusterGremlinConnector implements GremlinConnector {
.maxInProcessPerConnection(MAX_IN_PROCESS) .maxInProcessPerConnection(MAX_IN_PROCESS)
.maxContentLength(MAX_CONTENT_LENGTH) .maxContentLength(MAX_CONTENT_LENGTH)
.serializer(Serializers.GRAPHSON_V2D0.toString()) .serializer(Serializers.GRAPHSON_V2D0.toString())
.keepAliveInterval(KEEP_ALIVE_TIME)
.create(); .create();
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
throw new AppException( throw new AppException(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment