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/851a8deb
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/851a8deb
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/851a8deb
Branch: refs/heads/TINKERPOP-1603
Commit: 851a8debe859b9d6a39f4ce8461db7138c2246a0
Parents: deeeb87
Author: Stephen Mallette <[email protected]>
Authored: Thu Jun 29 12:16:33 2017 -0400
Committer: Stephen Mallette <[email protected]>
Committed: Thu Jun 29 14:52:56 2017 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 3 +-
docs/src/upgrade/release-3.3.x.asciidoc | 15 ++++++++++
.../AbstractGraphSONMessageSerializerV1d0.java | 30 +-------------------
.../ser/AbstractGryoMessageSerializerV1d0.java | 28 +-----------------
.../gremlin/server/AbstractChannelizer.java | 3 --
5 files changed, 19 insertions(+), 60 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/851a8deb/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 9390acd..2f4c242 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -39,13 +39,14 @@ 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.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/851a8deb/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 a772fb4..35e27d7 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -289,6 +289,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/851a8deb/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 10d104a..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,13 +57,6 @@ public abstract class AbstractGraphSONMessageSerializerV1d0
extends AbstractMess
protected ObjectMapper mapper;
- /**
- * @deprecated As of release 3.2.6, replaced by functionality provided by
{@link AbstractMessageSerializer#TOKEN_IO_REGISTRIES}.
- * @see <a
href="https://issues.apache.org/jira/browse/TINKERPOP-1694">TINKERPOP-1694</a>
- */
- @Deprecated
- public static final String TOKEN_USE_MAPPER_FROM_GRAPH =
"useMapperFromGraph";
-
protected final TypeReference<Map<String, Object>> mapTypeReference = new
TypeReference<Map<String, Object>>() {
};
@@ -82,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/851a8deb/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 c79c124..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
@@ -62,12 +62,6 @@ public abstract class AbstractGryoMessageSerializerV1d0
extends AbstractMessageS
public static final String TOKEN_CUSTOM = "custom";
public static final String TOKEN_SERIALIZE_RESULT_TO_STRING =
"serializeResultToString";
- /**
- * @deprecated As of release 3.2.6, replaced by functionality provided by
{@link AbstractMessageSerializer#TOKEN_IO_REGISTRIES}.
- * @see <a
href="https://issues.apache.org/jira/browse/TINKERPOP-1694">TINKERPOP-1694</a>
- */
- @Deprecated
- 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";
@@ -93,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/851a8deb/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 dca7055..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
@@ -197,9 +197,6 @@ public abstract class AbstractChannelizer extends
ChannelInitializer<SocketChann
graphsDefinedAtStartup.put(graphName,
graphManager.getGraph(graphName));
}
- if
(config.config.containsKey(AbstractGryoMessageSerializerV1d0.TOKEN_USE_MAPPER_FROM_GRAPH))
- logger.warn("{} utilizes the {} configuration setting
which is deprecated - prefer use of {}", config.className,
AbstractGryoMessageSerializerV1d0.TOKEN_USE_MAPPER_FROM_GRAPH,
AbstractGryoMessageSerializerV1d0.TOKEN_IO_REGISTRIES);
-
if (config.config != null)
serializer.configure(config.config,
graphsDefinedAtStartup);