Repository: kylin
Updated Branches:
  refs/heads/master 07e81fd0b -> c13ab1c32


KYLIN-2091 bug fix

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

Branch: refs/heads/master
Commit: c13ab1c324bf6a56e75365e0e1ab5ecd48fd048a
Parents: 07e81fd
Author: shaofengshi <shaofeng...@apache.org>
Authored: Tue Oct 18 10:43:13 2016 +0800
Committer: shaofengshi <shaofeng...@apache.org>
Committed: Tue Oct 18 10:43:13 2016 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kylin/cube/CubeSegment.java    | 12 ------------
 .../apache/kylin/source/kafka/job/SeekOffsetStep.java   |  2 ++
 2 files changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/c13ab1c3/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
index eb5b389..fdf1fb0 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
@@ -564,12 +564,6 @@ public class CubeSegment implements 
Comparable<CubeSegment>, IBuildable, ISegmen
 
     public void setSourcePartitionOffsetEnd(Map<Integer, Long> 
sourcePartitionOffsetEnd) {
         this.sourcePartitionOffsetEnd = sourcePartitionOffsetEnd;
-        long total = 0;
-        for (Long x : sourcePartitionOffsetEnd.values()) {
-            total += x;
-        }
-
-        this.sourceOffsetEnd = total;
     }
 
     public Map<Integer, Long> getSourcePartitionOffsetStart() {
@@ -578,11 +572,5 @@ public class CubeSegment implements 
Comparable<CubeSegment>, IBuildable, ISegmen
 
     public void setSourcePartitionOffsetStart(Map<Integer, Long> 
sourcePartitionOffsetStart) {
         this.sourcePartitionOffsetStart = sourcePartitionOffsetStart;
-        long total = 0;
-        for (Long x : sourcePartitionOffsetStart.values()) {
-            total += x;
-        }
-
-        this.sourceOffsetStart = total;
     }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/c13ab1c3/source-kafka/src/main/java/org/apache/kylin/source/kafka/job/SeekOffsetStep.java
----------------------------------------------------------------------
diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/job/SeekOffsetStep.java
 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/job/SeekOffsetStep.java
index 2a3dbb5..a26f39d 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/job/SeekOffsetStep.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/job/SeekOffsetStep.java
@@ -116,6 +116,8 @@ public class SeekOffsetStep extends AbstractExecutable {
         }
 
         if (totalEndOffset > totalStartOffset) {
+            segment.setSourceOffsetStart(totalStartOffset);
+            segment.setSourceOffsetEnd(totalEndOffset);
             segment.setSourcePartitionOffsetStart(startOffsets);
             segment.setSourcePartitionOffsetEnd(endOffsets);
             segment.setName(CubeSegment.makeSegmentName(0, 0, 
totalStartOffset, totalEndOffset));

Reply via email to