Lessened log severity for Gremlin Server wrt serializers No behavioral change here except that users won't see a WARN message anymore if multiple serializers support the same mimetype. CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/347a0a96 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/347a0a96 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/347a0a96 Branch: refs/heads/TINKERPOP-1545-tp32 Commit: 347a0a9603d834a5b1dbd4874b701a6363b84644 Parents: 708c601 Author: Stephen Mallette <[email protected]> Authored: Mon Dec 12 09:21:26 2016 -0500 Committer: Stephen Mallette <[email protected]> Committed: Mon Dec 12 09:21:26 2016 -0500 ---------------------------------------------------------------------- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-applications.asciidoc | 18 ++++++++++++------ .../gremlin/server/AbstractChannelizer.java | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/347a0a96/CHANGELOG.asciidoc ---------------------------------------------------------------------- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index add4370..8e01ce0 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Lessened the severity of Gremlin Server logging when it encounters two or more serializers addressing the same mime type. * Bumped to Netty 4.0.42.final. * Fixed a bug in Gremlin-Python around `__.__()` and `__.start()`. * Fixed a bug around long serialization in Gremlin-Python when using Python3. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/347a0a96/docs/src/reference/gremlin-applications.asciidoc ---------------------------------------------------------------------- diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc index f7ba2b5..53b1dfd 100644 --- a/docs/src/reference/gremlin-applications.asciidoc +++ b/docs/src/reference/gremlin-applications.asciidoc @@ -1381,12 +1381,18 @@ link:http://docs.groovy-lang.org/latest/html/documentation/#compilation-customiz Serialization ^^^^^^^^^^^^^ -Gremlin Server can accept requests and return results using different serialization formats. The format of the -serialization is configured by the `serializers` setting described in the table above. Note that some serializers -have additional configuration options as defined by the `serializers[X].config` setting. The `config` setting is a -`Map` where the keys and values get passed to the serializer at its initialization. The available and/or expected -keys are dependent on the serializer being used. Gremlin Server comes packaged with two different serializers: -GraphSON and Gryo. +Gremlin Server can accept requests and return results using different serialization formats. Serializers implement the +`MessageSerializer` interface. In doing so, they express the list of mime types they expect to support. When +configuring multiple serializers it is possible for two or more serializers to support the same mime type. Such a +situation may be common with a generic mime type such as `application/json`. Serializers are added in the order that +they are encountered in the configuration file and the first one added for a specific mime type will not be overridden +by other serializers that also support it. + +The format of the serialization is configured by the `serializers` setting described in the table above. Note that +some serializers have additional configuration options as defined by the `serializers[X].config` setting. The +`config` setting is a `Map` where the keys and values get passed to the serializer at its initialization. The +available and/or expected keys are dependent on the serializer being used. Gremlin Server comes packaged with two +different serializers: GraphSON and Gryo. GraphSON ++++++++ http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/347a0a96/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 fdedd31..57c6994 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,7 +196,7 @@ public abstract class AbstractChannelizer extends ChannelInitializer<SocketChann final String mimeType = pair.getValue0(); final MessageSerializer serializer = pair.getValue1(); if (serializers.containsKey(mimeType)) - logger.warn("{} already has {} configured. It will not be replaced by {}. Check configuration for serializer duplication or other issues.", + logger.info("{} already has {} configured - it will not be replaced by {}.", mimeType, serializers.get(mimeType).getClass().getName(), serializer.getClass().getName()); else { logger.info("Configured {} with {}", mimeType, pair.getValue1().getClass().getName());
