[
https://issues.apache.org/jira/browse/KAFKA-9775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17068581#comment-17068581
]
ASF GitHub Bot commented on KAFKA-9775:
---------------------------------------
tombentley commented on pull request #8373: KAFKA-9775: Fix
IllegalFormatConversionException in ToolsUtils
URL: https://github.com/apache/kafka/pull/8373
The runtime type of Metric.metricValue() needn't always be a Double,
for example, if it's a gauge from IntGaugeSuite.
Since it's impossible to format non-double values with 3 point precision
IllegalFormatConversionException resulted.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> IllegalFormatConversionException from kafka-consumer-perf-test.sh
> -----------------------------------------------------------------
>
> Key: KAFKA-9775
> URL: https://issues.apache.org/jira/browse/KAFKA-9775
> Project: Kafka
> Issue Type: Bug
> Components: tools
> Reporter: Tom Bentley
> Assignee: Tom Bentley
> Priority: Major
>
> Exception in thread "main" java.util.IllegalFormatConversionException: f !=
> java.lang.Integer
> at
> java.base/java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4426)
> at
> java.base/java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2951)
> at
> java.base/java.util.Formatter$FormatSpecifier.print(Formatter.java:2898)
> at java.base/java.util.Formatter.format(Formatter.java:2673)
> at java.base/java.util.Formatter.format(Formatter.java:2609)
> at java.base/java.lang.String.format(String.java:2897)
> at scala.collection.immutable.StringLike.format(StringLike.scala:354)
> at scala.collection.immutable.StringLike.format$(StringLike.scala:353)
> at scala.collection.immutable.StringOps.format(StringOps.scala:33)
> at kafka.utils.ToolsUtils$.$anonfun$printMetrics$3(ToolsUtils.scala:60)
> at
> kafka.utils.ToolsUtils$.$anonfun$printMetrics$3$adapted(ToolsUtils.scala:58)
> at
> scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
> at
> scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
> at kafka.utils.ToolsUtils$.printMetrics(ToolsUtils.scala:58)
> at kafka.tools.ConsumerPerformance$.main(ConsumerPerformance.scala:82)
> at kafka.tools.ConsumerPerformance.main(ConsumerPerformance.scala)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)