You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/03/14 01:01:12 UTC

[37/50] [abbrv] incubator-kylin git commit: fix

fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/5781a0a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/5781a0a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/5781a0a2

Branch: refs/heads/streaming-localdict
Commit: 5781a0a2f42ef3b78e0a29d981670effcdcb438c
Parents: 5b5cb31
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Mar 13 13:02:53 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Mar 13 13:02:53 2015 +0800

----------------------------------------------------------------------
 .../kylin/invertedindex/model/IIKeyValueCodec.java     | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5781a0a2/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java b/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
index d7372bc..2f69421 100644
--- a/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
+++ b/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
@@ -148,14 +148,9 @@ public class IIKeyValueCodec implements KeyValueCodec {
 				ImmutableBytesWritable v = kv.getValue();
 				decodeKey(k);
                 final Dictionary<?> dictionary = deserialize(kv.getDictionary());
-                addContainer(curCol, new CompressedValueContainer(dictionary.getSizeOfId(), (dictionary.getMaxId() - dictionary.getMinId() + 1), (dictionary.getMaxId() - dictionary.getMinId() + 1)));
-                byte[] bytes = new byte[dictionary.getSizeOfValue()];
-                ImmutableBytesWritable buffer = new ImmutableBytesWritable(bytes);
-                for (int i = dictionary.getMinId(); i <= dictionary.getMaxId(); ++i) {
-                    final int length = dictionary.getValueBytesFromId(i, bytes, 0);
-                    buffer.set(bytes, 0, length);
-                    containers[curCol].append(buffer);
-                }
+                final CompressedValueContainer c = new CompressedValueContainer(dictionary.getSizeOfId(), (dictionary.getMaxId() - dictionary.getMinId() + 1), 0);
+                c.fromBytes(kv.getValue());
+                addContainer(curCol, c);
                 localDictionaries.put(curCol, dictionary);
                 if (localDictionaries.size() < digest.getColumnCount()) {
                     continue;
@@ -236,4 +231,6 @@ public class IIKeyValueCodec implements KeyValueCodec {
 
 	}
 
+
+
 }