commit | a00708ddc5cf1a25d2430501b958035190a9f58c | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Mon Oct 17 08:58:36 2016 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Mon Oct 17 12:17:45 2016 +0100 |
tree | 702c49f7bd51b364b5f5e16e8c0cd5e9aad90f9f | |
parent | 481e6e80432681840f0a47fc27abe5730c783e40 [diff] |
Reset current thread classLoader to avoid Kafka to use it When the current thread classloader is set, Apache Kafka tries to use it to resolve its classes. For plugins the thread class loader is not the one that read from the jar and thus connections to Kafka fail because of ClassNotFoundException Change-Id: I4f14cf43d1465841c5eb7db2c35acd9beed8d19f
This plugins allows to define a distributed stream of events published by Gerrit.
Events can be anything, from the traditional stream events to the Gerrit metrics.
This plugin requires Gerrit 2.13 or laster.
linux
java-1.8
Buck
Clone or link this plugin to the plugins directory of Gerrit's source tree, and issue the command:
buck build plugins/kafka-events
The output is created in
buck-out/gen/plugins/kafka-events/kafka-events.jar
Assuming a running Kafka broker on the same Gerrit host, add the following settings to gerrit.config:
[plugin "kafka-events"] bootstrapServers = localhost:9092