Return-Path: X-Original-To: apmail-kafka-commits-archive@www.apache.org Delivered-To: apmail-kafka-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54CB81047A for ; Fri, 25 Oct 2013 04:34:45 +0000 (UTC) Received: (qmail 79312 invoked by uid 500); 25 Oct 2013 04:34:45 -0000 Delivered-To: apmail-kafka-commits-archive@kafka.apache.org Received: (qmail 79120 invoked by uid 500); 25 Oct 2013 04:34:42 -0000 Mailing-List: contact commits-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list commits@kafka.apache.org Received: (qmail 78897 invoked by uid 99); 25 Oct 2013 04:34:39 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 04:34:39 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 58B2681CDE0; Fri, 25 Oct 2013 04:34:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jkreps@apache.org To: commits@kafka.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: KAFKA-1098 Fix failing test in LogCleaner. Date: Fri, 25 Oct 2013 04:34:39 +0000 (UTC) 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 Authored: Thu Oct 24 21:33:53 2013 -0700 Committer: Jay Kreps 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 } }