Skip to content

Commit

Permalink
Fix for Kafka metrics reporters
Browse files Browse the repository at this point in the history
  • Loading branch information
serejja committed Jul 29, 2015
1 parent baec260 commit 273a010
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scala/ly/stealth/mesos/kafka/BrokerServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ object BrokerServer {
val config: Object = configClass.getConstructor(classOf[Properties]).newInstance(props).asInstanceOf[Object]
val server: Object = serverClass.getConstructor(configClass).newInstance(config).asInstanceOf[Object]

val metricsReporter = loader.loadClass("kafka.metrics.KafkaMetricsReporter$").getField("MODULE$").get(null)
val metricsReporterClass = metricsReporter.getClass
val verifiableProps = config.getClass.getMethod("props").invoke(config)
metricsReporterClass.getMethod("startReporters", verifiableProps.getClass).invoke(metricsReporter, verifiableProps)

server
}

Expand Down

0 comments on commit 273a010

Please sign in to comment.