You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by lu...@apache.org on 2015/07/21 10:05:27 UTC
[21/50] [abbrv] incubator-kylin git commit: KYLIN-839 Optimize
Snapshot table memory usage
KYLIN-839 Optimize Snapshot table memory usage
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/3ce0233d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/3ce0233d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/3ce0233d
Branch: refs/heads/master
Commit: 3ce0233d4def856c348c7c31d4a8b8b0e6d2b710
Parents: 7fdcd31
Author: shaofengshi <sh...@apache.org>
Authored: Tue Jun 30 15:09:56 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Tue Jun 30 15:09:56 2015 +0800
----------------------------------------------------------------------
.../main/java/org/apache/kylin/dict/lookup/SnapshotTable.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/3ce0233d/dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java
----------------------------------------------------------------------
diff --git a/dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java b/dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java
index 28db5b4..fb1feb1 100644
--- a/dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java
+++ b/dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java
@@ -80,7 +80,8 @@ public class SnapshotTable extends RootPersistentEntity implements ReadableTable
}
for (String cell : row) {
- b.addValue(cell);
+ if (cell != null)
+ b.addValue(cell);
}
}
@@ -231,7 +232,8 @@ public class SnapshotTable extends RootPersistentEntity implements ReadableTable
rows.add(row);
for (int j = 0; j < n; j++) {
row[j] = in.readUTF();
- b.addValue(row[j]);
+ if (row[j] != null)
+ b.addValue(row[j]);
}
}
this.dict = b.build(0);