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 2016/10/20 23:22:38 UTC
[14/50] [abbrv] kylin git commit: KYLIN-2091 bug fix
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/KYLIN-1971
Commit: c13ab1c324bf6a56e75365e0e1ab5ecd48fd048a
Parents: 07e81fd
Author: shaofengshi <sh...@apache.org>
Authored: Tue Oct 18 10:43:13 2016 +0800
Committer: shaofengshi <sh...@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));