kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkr...@apache.org
Subject git commit: KAFKA-1098 Fix failing test in LogCleaner.
Date Fri, 25 Oct 2013 04:34:39 GMT
Updated Branches:
  refs/heads/trunk 0198e67fe -> 0e90c246c


KAFKA-1098 Fix failing test in LogCleaner.


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

Branch: refs/heads/trunk
Commit: 0e90c246c68954204ea524139023d97173bfde56
Parents: 0198e67
Author: Jay Kreps <jay.kreps@gmail.com>
Authored: Thu Oct 24 21:33:53 2013 -0700
Committer: Jay Kreps <jay.kreps@gmail.com>
Committed: Thu Oct 24 21:33:53 2013 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/log/Log.scala | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/0e90c246/core/src/main/scala/kafka/log/Log.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/log/Log.scala b/core/src/main/scala/kafka/log/Log.scala
index 8cd489e..0cc402b 100644
--- a/core/src/main/scala/kafka/log/Log.scala
+++ b/core/src/main/scala/kafka/log/Log.scala
@@ -60,7 +60,7 @@ class Log(val dir: File,
   private val lastflushedTime = new AtomicLong(time.milliseconds)
 
   /* the actual segments of the log */
-  private val segments: ConcurrentNavigableMap[Long,LogSegment] = new ConcurrentSkipListMap[Long,
LogSegment]
+  private val segments: ConcurrentNavigableMap[java.lang.Long, LogSegment] = new ConcurrentSkipListMap[java.lang.Long,
LogSegment]
   loadSegments()
   
   /* The number of times the log has been truncated */
@@ -170,7 +170,7 @@ class Log(val dir: File,
       this.recoveryPoint = lastOffset
       return
     }
-    val unflushed = logSegments(segments.floorKey(this.recoveryPoint), Long.MaxValue).iterator
+    val unflushed = logSegments(this.recoveryPoint, Long.MaxValue).iterator
     while(unflushed.hasNext) {
       val curr = unflushed.next
       info("Recovering unflushed segment %d in log %s.".format(curr.baseOffset, name))
@@ -597,11 +597,11 @@ class Log(val dir: File,
   def logSegments(from: Long, to: Long): Iterable[LogSegment] = {
     import JavaConversions._
     lock synchronized {
-      val floor: java.lang.Long = segments.floorKey(from)
+      val floor = segments.floorKey(from)
       if(floor eq null)
-        asIterable(segments.headMap(to).values)
+        segments.headMap(to).values
       else
-        asIterable(segments.subMap(floor.longValue, true, to, false).values)
+        segments.subMap(floor, true, to, false).values
     }
   }
   


Mime
View raw message