Skip to content

Commit

Permalink
Merge branch 'serejja-metric-reporters-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrypekar committed Jul 29, 2015
2 parents baec260 + 273a010 commit 4ac4f67
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 4ac4f67

Please sign in to comment.