Skip to content

Commit

Permalink
Override kafka JmxReporter
Browse files Browse the repository at this point in the history
  • Loading branch information
patelh committed Mar 3, 2020
1 parent e49c461 commit afdb8cc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions app/org/apache/kafka/common/metrics/JmxReporter.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*/

package org.apache.kafka.common.metrics
import java.util

import grizzled.slf4j.Logging

/*
Override Kafka Client's implementation since we don't want to always report to Jmx
*/
class JmxReporter(prefix: String) extends MetricsReporter with Logging {
override def init(metrics: util.List[KafkaMetric]): Unit = {}

override def metricChange(metric: KafkaMetric): Unit = {}

override def metricRemoval(metric: KafkaMetric): Unit = {}

override def close(): Unit = {}

override def configure(configs: util.Map[String, _]): Unit = {
info("Using cmak JmxReporter")
}
}

0 comments on commit afdb8cc

Please sign in to comment.