Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1603 5b53e7014 -> b07e0e13f
TINKERPOP-1699 Removed deprecated userMapperFromGraph option
Conflicts:
CHANGELOG.asciidoc
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV1d0.java
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/341ccf67
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/341ccf67
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/341ccf67
Branch: refs/heads/TINKERPOP-1603
Commit: 341ccf67cf18b057ab606c835ca281c49af77764
Parents: 5b53e70
Author: Stephen Mallette <[email protected]>
Authored: Thu Jun 29 12:16:33 2017 -0400
Committer: Stephen Mallette <[email protected]>
Committed: Thu Jun 29 12:22:28 2017 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 4 +++-
docs/src/upgrade/release-3.3.x.asciidoc | 15 ++++++++++++
.../AbstractGraphSONMessageSerializerV1d0.java | 25 +-------------------
.../ser/AbstractGryoMessageSerializerV1d0.java | 24 ++-----------------
.../gremlin/server/AbstractChannelizer.java | 1 +
5 files changed, 22 insertions(+), 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ccf67/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 873cb7c..1f77ae0 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -39,13 +39,15 @@ TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
* Added "attachment requisite" `VertexProperty.element()` and
`Property.element()` data in GraphSON serialization.
* GraphSON 3.0 is now the default serialization format in TinkerGraph and
Gremlin Server.
* Established the GraphSON 3.0 format.
+* Changed `ServerGremlinExecutor` to not use generics since there really is no
flexibility in the kind of `ScheduledExecutorService` that will be used.
+* Removed previously deprecated `useMapperFromGraph` option.
* Removed previously deprecated `Io.Builder#registry(IoRegistry)` method.
* Removed previously deprecated `GryoMessageSerializerV1d0(GryoMapper)`
constructor.
* Removed previously deprecated `TinkerIoRegistry`.
* Removed previously deprecated `getInstance()` methods on all TinkerPop
classes.
* Removed previously deprecated `VertexPropertyFeatures.supportsAddProperty()`.
* Removed previously deprecated TinkerGraph configuration member variables.
-* Changed `ServerGremlinExecutor` to not use generics since there really is no
flexibility in the kind of `ScheduledExecutorService` that will be used.
+* Removed previously deprecated `Transaction.submit(Function)`.
* Removed previously deprecated `OpSelectorHandler.errorMeter` and
`AbstractEvalOpProcessor.errorMeter` fields.
* Removed previously deprecated `AbstractEvalOpProcessor.validBindingName`
field.
* Removed previously deprecated
`SimpleAuthenticator.CONFIG_CREDENTIALS_LOCATION` field.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ccf67/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc
b/docs/src/upgrade/release-3.3.x.asciidoc
index 9c4a61f..de4401a 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -288,6 +288,21 @@ The switch name has changed for installing dependencies.
`-i` has been deprecate
See: link:https://issues.apache.org/jira/browse/TINKERPOP-980[TINKERPOP-980],
link:http://tinkerpop.apache.org/docs/3.3.0/reference/#_configuring_2[Reference
Documentation - Server Configuration].
+Removal of useMapperFromGraph
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The `userMapperFromGraph` serialization configuration option was used to allow
the IO configurations of a specific
+graph to be assigned to a specific serializer. This feature has been removed
completely now. Please use the
+`ioRegistries` configuration option to add one or more specific `Graph`
serialization capabilities to a serializer.
+
+[source,yaml]
+----
+serializers:
+ - { className:
org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: {
ioRegistries:
[org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV1d0] }}
# application/vnd.gremlin-v1.0+gryo
+----
+
+see: link:https://issues.apache.org/jira/browse/TINKERPOP-1699[TINKERPOP-1699]
+
Gremlin-server.bat
^^^^^^^^^^^^^^^^^^
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ccf67/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
----------------------------------------------------------------------
diff --git
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
index e23fc9c..e09618e 100644
---
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
+++
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
@@ -57,8 +57,6 @@ public abstract class AbstractGraphSONMessageSerializerV1d0
extends AbstractMess
protected ObjectMapper mapper;
- public static final String TOKEN_USE_MAPPER_FROM_GRAPH =
"useMapperFromGraph";
-
protected final TypeReference<Map<String, Object>> mapTypeReference = new
TypeReference<Map<String, Object>>() {
};
@@ -77,29 +75,8 @@ public abstract class AbstractGraphSONMessageSerializerV1d0
extends AbstractMess
@Override
public void configure(final Map<String, Object> config, final Map<String,
Graph> graphs) {
- final GraphSONMapper.Builder initialBuilder;
- final Object graphToUseForMapper =
config.get(TOKEN_USE_MAPPER_FROM_GRAPH);
- if (graphToUseForMapper != null) {
- if (null == graphs) throw new IllegalStateException(String.format(
- "No graphs have been provided to the serializer and
therefore %s is not a valid configuration", TOKEN_USE_MAPPER_FROM_GRAPH));
-
- final Graph g = graphs.get(graphToUseForMapper.toString());
- if (null == g) throw new IllegalStateException(String.format(
- "There is no graph named [%s] configured to be used in the
%s setting",
- graphToUseForMapper, TOKEN_USE_MAPPER_FROM_GRAPH));
-
- // a graph was found so use the mapper it constructs. this allows
graphson to be auto-configured with any
- // custom classes that the implementation allows for
- initialBuilder = initBuilder(g.io(GraphSONIo.build()).mapper());
- } else {
- // no graph was supplied so just use the default - this will
likely be the case when using a graph
- // with no custom classes or a situation where the user needs
complete control like when using two
- // distinct implementations each with their own custom classes.
- initialBuilder = initBuilder(null);
- }
-
+ final GraphSONMapper.Builder initialBuilder = initBuilder(null);
addIoRegistries(config, initialBuilder);
-
mapper = configureBuilder(initialBuilder).create().createMapper();
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ccf67/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV1d0.java
----------------------------------------------------------------------
diff --git
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV1d0.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV1d0.java
index ace6bb0..d263a87 100644
---
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV1d0.java
+++
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV1d0.java
@@ -61,7 +61,7 @@ public abstract class AbstractGryoMessageSerializerV1d0
extends AbstractMessageS
public static final String TOKEN_CUSTOM = "custom";
public static final String TOKEN_SERIALIZE_RESULT_TO_STRING =
"serializeResultToString";
- public static final String TOKEN_USE_MAPPER_FROM_GRAPH =
"useMapperFromGraph";
+
public static final String TOKEN_BUFFER_SIZE = "bufferSize";
public static final String TOKEN_CLASS_RESOLVER_SUPPLIER =
"classResolverSupplier";
@@ -87,27 +87,7 @@ public abstract class AbstractGryoMessageSerializerV1d0
extends AbstractMessageS
@Override
public final void configure(final Map<String, Object> config, final
Map<String, Graph> graphs) {
- final GryoMapper.Builder builder;
- final Object graphToUseForMapper =
config.get(TOKEN_USE_MAPPER_FROM_GRAPH);
- if (graphToUseForMapper != null) {
- if (null == graphs) throw new IllegalStateException(String.format(
- "No graphs have been provided to the serializer and
therefore %s is not a valid configuration", TOKEN_USE_MAPPER_FROM_GRAPH));
-
- final Graph g = graphs.get(graphToUseForMapper.toString());
- if (null == g) throw new IllegalStateException(String.format(
- "There is no graph named [%s] configured to be used in the
%s setting",
- graphToUseForMapper, TOKEN_USE_MAPPER_FROM_GRAPH));
-
- // a graph was found so use the mapper it constructs. this allows
gryo to be auto-configured with any
- // custom classes that the implementation allows for
- builder = g.io(GryoIo.build()).mapper();
- } else {
- // no graph was supplied so just use the default - this will
likely be the case when using a graph
- // with no custom classes or a situation where the user needs
complete control like when using two
- // distinct implementations each with their own custom classes.
- builder = GryoMapper.build();
- }
-
+ final GryoMapper.Builder builder = GryoMapper.build();
addIoRegistries(config, builder);
addClassResolverSupplier(config, builder);
addCustomClasses(config, builder);
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/341ccf67/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --git
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index 086074a..936c770 100644
---
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@ -196,6 +196,7 @@ public abstract class AbstractChannelizer extends
ChannelInitializer<SocketChann
for (String graphName : settings.graphs.keySet()) {
graphsDefinedAtStartup.put(graphName,
graphManager.getGraph(graphName));
}
+
if (config.config != null)
serializer.configure(config.config,
graphsDefinedAtStartup);