You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/12/30 06:36:58 UTC

[GitHub] [kafka] ijuma commented on a diff in pull request #13056: KAFKA-14556: make sure log cleaner throttler start time is correct

ijuma commented on code in PR #13056:
URL: https://github.com/apache/kafka/pull/13056#discussion_r1059260700


##########
core/src/main/scala/kafka/utils/Throttler.scala:
##########
@@ -27,32 +27,35 @@ import scala.math._
 
 /**
  * A class to measure and throttle the rate of some process. The throttler takes a desired rate-per-second
- * (the units of the process don't matter, it could be bytes or a count of some other thing), and will sleep for 
- * an appropriate amount of time when maybeThrottle() is called to attain the desired rate.
+ * (the units of the process don't matter, it could be bytes or a count of some other thing), and will sleep for
+ * an appropriate amount of time when {@link maybeThrottle(double)} is called to attain the desired rate.
  * 
  * @param desiredRatePerSec: The rate we want to hit in units/sec
  * @param checkIntervalMs: The interval at which to check our rate
  * @param throttleDown: Does throttling increase or decrease our rate?
+ * @param metricName: The metric name for this throttler
  * @param time: The time implementation to use
+ * @param units: The units of the {@code time}
  */
 @threadsafe
 class Throttler(@volatile var desiredRatePerSec: Double,
-                checkIntervalMs: Long = 100L,
+                checkIntervalMs: Long = 300L,
                 throttleDown: Boolean = true,
-                metricName: String = "throttler",
-                units: String = "entries",
+                metricName: String = "cleaner-io",
+                units: String = "bytes",
                 time: Time = Time.SYSTEM) extends Logging with KafkaMetricsGroup {

Review Comment:
   We shouldn't do that since `Throttler` is in a `utils` package.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org