Repository: kylin Updated Branches: refs/heads/master d56abdea8 -> 5512147df
KYLIN-1723 GTAggregateScanner$Dump.flush() must not write the WHOLE metrics buffer Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/5512147d Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/5512147d Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/5512147d Branch: refs/heads/master Commit: 5512147df6722f306580b3671bcaffb1c6ec6ef4 Parents: d56abde Author: lidongsjtu <[email protected]> Authored: Sun May 22 21:52:26 2016 +0800 Committer: lidongsjtu <[email protected]> Committed: Sun May 22 21:53:11 2016 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/kylin/gridtable/GTAggregateScanner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/5512147d/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java ---------------------------------------------------------------------- diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java index a2ca40c..b170524 100644 --- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java +++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java @@ -35,6 +35,7 @@ import java.util.PriorityQueue; import java.util.SortedMap; import org.apache.kylin.common.util.ByteArray; +import org.apache.kylin.common.util.BytesUtil; import org.apache.kylin.common.util.ImmutableBitSet; import org.apache.kylin.common.util.MemoryBudgetController; import org.apache.kylin.common.util.MemoryBudgetController.MemoryWaterLevel; @@ -451,7 +452,7 @@ public class GTAggregateScanner implements IGTScanner { aggs.collectStates(aggrResult); ByteBuffer metricsBuf = measureCodec.encode(aggrResult); oos.writeObject(entry.getKey()); - oos.writeObject(metricsBuf.array()); + oos.writeObject(BytesUtil.subarray(metricsBuf.array(), 0, metricsBuf.position())); } } finally { buffMap = null;
