kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-938; High CPU usage when more or less idle; patched by Sam Meder; reviewed by Jun Rao
Date Wed, 12 Jun 2013 05:43:20 GMT
Updated Branches:
  refs/heads/0.8 ddb7947c0 -> 6881bf08f


kafka-938; High CPU usage when more or less idle; patched by Sam Meder; reviewed by Jun Rao


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

Branch: refs/heads/0.8
Commit: 6881bf08f26ec64c056c6880922c4321679ba92d
Parents: ddb7947
Author: Sam Meder <sam.meder@gmail.com>
Authored: Tue Jun 11 22:43:41 2013 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Jun 11 22:43:41 2013 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/utils/DelayedItem.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/6881bf08/core/src/main/scala/kafka/utils/DelayedItem.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/DelayedItem.scala b/core/src/main/scala/kafka/utils/DelayedItem.scala
index 93c4482..d727649 100644
--- a/core/src/main/scala/kafka/utils/DelayedItem.scala
+++ b/core/src/main/scala/kafka/utils/DelayedItem.scala
@@ -37,7 +37,7 @@ class DelayedItem[T](val item: T, delay: Long, unit: TimeUnit) extends Delayed
w
    */
   def getDelay(unit: TimeUnit): Long = {
     val elapsedMs = (SystemTime.milliseconds - createdMs)
-    unit.convert(max(delayMs - elapsedMs, 0), unit)
+    unit.convert(max(delayMs - elapsedMs, 0), TimeUnit.MILLISECONDS)
   }
     
   def compareTo(d: Delayed): Int = {


Mime
View raw message