chia7712 commented on code in PR #19175:
URL: https://github.com/apache/kafka/pull/19175#discussion_r1991796860


##########
core/src/main/scala/kafka/utils/CoreUtils.scala:
##########
@@ -218,30 +207,11 @@ object CoreUtils {
     endPoints
   }
 
-  def generateUuidAsBase64(): String = {
-    val uuid = UUID.randomUUID()
-    Base64.getUrlEncoder.withoutPadding.encodeToString(getBytesFromUuid(uuid))

Review Comment:
   we can remove `getBytesFromUuid` too, as it is not used in production code 
now.



##########
core/src/main/scala/kafka/metrics/KafkaMetricsReporter.scala:
##########
@@ -62,7 +63,7 @@ object KafkaMetricsReporter {
         val metricsConfig = new KafkaMetricsConfig(verifiableProps)
         if (metricsConfig.reporters.nonEmpty) {
           metricsConfig.reporters.foreach(reporterType => {
-            val reporter = 
CoreUtils.createObject[KafkaMetricsReporter](reporterType)

Review Comment:
   We could apply the same approach to DumpLogSegments, which would then allow 
us to remove CoreUtils.createObject.
   
   
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/tools/DumpLogSegments.scala#L649
   
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/tools/DumpLogSegments.scala#L650



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to