kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject kafka git commit: KAFKA-2776: Fix lookup of schema conversion cache size in JsonConverter.
Date Mon, 09 Nov 2015 18:19:41 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk a24f9a23a -> e9fc7b8c8


KAFKA-2776: Fix lookup of schema conversion cache size in JsonConverter.

Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Gwen Shapira

Closes #458 from ewencp/kafka-2776-json-converter-cache-config-fix


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/e9fc7b8c
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/e9fc7b8c
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/e9fc7b8c

Branch: refs/heads/trunk
Commit: e9fc7b8c84908ae642339a2522a79f8bb5155728
Parents: a24f9a2
Author: Ewen Cheslack-Postava <me@ewencp.org>
Authored: Mon Nov 9 10:19:27 2015 -0800
Committer: Gwen Shapira <cshapi@gmail.com>
Committed: Mon Nov 9 10:19:27 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/kafka/connect/json/JsonConverter.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/e9fc7b8c/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
----------------------------------------------------------------------
diff --git a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
index 5e47ad2..815d32b 100644
--- a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
+++ b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
@@ -44,7 +44,7 @@ import java.util.Map;
 public class JsonConverter implements Converter {
     private static final String SCHEMAS_ENABLE_CONFIG = "schemas.enable";
     private static final boolean SCHEMAS_ENABLE_DEFAULT = true;
-    private static final String SCHEMAS_CACHE_CONFIG = "schemas.cache.size";
+    private static final String SCHEMAS_CACHE_SIZE_CONFIG = "schemas.cache.size";
     private static final int SCHEMAS_CACHE_SIZE_DEFAULT = 1000;
 
     private static final HashMap<Schema.Type, JsonToConnectTypeConverter> TO_CONNECT_CONVERTERS
= new HashMap<>();
@@ -293,7 +293,7 @@ public class JsonConverter implements Converter {
         serializer.configure(configs, isKey);
         deserializer.configure(configs, isKey);
 
-        Object cacheSizeVal = configs.get(SCHEMAS_CACHE_SIZE_DEFAULT);
+        Object cacheSizeVal = configs.get(SCHEMAS_CACHE_SIZE_CONFIG);
         if (cacheSizeVal != null)
             cacheSize = (int) cacheSizeVal;
         fromConnectSchemaCache = new SynchronizedCache<>(new LRUCache<Schema, ObjectNode>(cacheSize));


Mime
View raw message