kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: KAFKA-3163; Minor follow up for (KIP-33)
Date Mon, 22 Aug 2016 17:34:06 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 317c4fded -> 113d23e8f


KAFKA-3163; Minor follow up for (KIP-33)

junrao Could you take a look when get a chance? Thanks.

Author: Jiangjie Qin <becket.qin@gmail.com>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #1769 from becketqin/KAFKA-3163-follow-up


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

Branch: refs/heads/trunk
Commit: 113d23e8fe290878120c1384b580181169777f4f
Parents: 317c4fd
Author: Jiangjie Qin <becket.qin@gmail.com>
Authored: Mon Aug 22 10:34:01 2016 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Mon Aug 22 10:34:01 2016 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/log/LogSegment.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/113d23e8/core/src/main/scala/kafka/log/LogSegment.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/log/LogSegment.scala b/core/src/main/scala/kafka/log/LogSegment.scala
index d894020..3d94452 100755
--- a/core/src/main/scala/kafka/log/LogSegment.scala
+++ b/core/src/main/scala/kafka/log/LogSegment.scala
@@ -349,7 +349,7 @@ class LogSegment(val log: FileMessageSet,
       if (iter.hasNext)
         rollingBasedTimestamp = Some(iter.next.message.timestamp)
       else
-        // If the log is empty, we return 0 as time waited.
+        // If the log is empty, we return time elapsed since the segment is created.
         return now - created
     }
     now - {if (rollingBasedTimestamp.get >= 0) rollingBasedTimestamp.get else created}
@@ -393,7 +393,7 @@ class LogSegment(val log: FileMessageSet,
    * Close this log segment
    */
   def close() {
-    timeIndex.maybeAppend(maxTimestampSoFar, offsetOfMaxTimestamp, skipFullCheck = true)
+    CoreUtils.swallow(timeIndex.maybeAppend(maxTimestampSoFar, offsetOfMaxTimestamp, skipFullCheck
= true))
     CoreUtils.swallow(index.close)
     CoreUtils.swallow(timeIndex.close())
     CoreUtils.swallow(log.close)


Mime
View raw message