KYLIN-1417 Change to use TreeMap to allow null as value
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/0ff0e6d5 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0ff0e6d5 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0ff0e6d5 Branch: refs/heads/helix-rebase Commit: 0ff0e6d504188fb0edbfc9be7e4e952079172182 Parents: 542f9a2 Author: shaofengshi <[email protected]> Authored: Tue Feb 16 10:29:47 2016 +0800 Committer: shaofengshi <[email protected]> Committed: Fri Mar 4 09:52:20 2016 +0800 ---------------------------------------------------------------------- .../org/apache/kylin/source/kafka/TimedJsonStreamParser.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/0ff0e6d5/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java ---------------------------------------------------------------------- diff --git a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java index b075387..4dccb17 100644 --- a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java +++ b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java @@ -35,11 +35,7 @@ package org.apache.kylin.source.kafka; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentSkipListMap; @@ -106,7 +102,7 @@ public final class TimedJsonStreamParser extends StreamingParser { public StreamingMessage parse(MessageAndOffset messageAndOffset) { try { Map<String, String> message = mapper.readValue(new ByteBufferBackedInputStream(messageAndOffset.message().payload()), mapType); - ConcurrentMap<String, String> root = new ConcurrentSkipListMap<String, String>(String.CASE_INSENSITIVE_ORDER); + Map<String, String> root = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER); root.putAll(message); String tsStr = root.get(tsColName); //Preconditions.checkArgument(!StringUtils.isEmpty(tsStr), "Timestamp field " + tsColName + //
