The BrokerTreeWatcher is a kind of watcher whose sole purpose is to watch the segment of the Zookeeper tree where Kafka stores broker information
Fields inherited from class | Fields |
---|---|
class AbstractTreeWatcher |
cache, client, logger, onInitComplete |
Type | Name and description |
---|---|
static java.lang.Integer |
INVALID_BROKER_ID |
Constructor and description |
---|
BrokerTreeWatcher
(org.apache.curator.framework.CuratorFramework client) |
Type | Name and description |
---|---|
java.lang.Integer |
brokerIdFromPath(java.lang.String path) Process a path string from Zookeeper for the Kafka broker's ID |
void |
childEvent(org.apache.curator.framework.CuratorFramework client, org.apache.curator.framework.recipes.cache.TreeCacheEvent event) Process events like NODE_ADDED and NODE_REMOVED to keep an up to date list of brokers |
java.lang.String |
zookeeperPath() |
Methods inherited from class | Name |
---|---|
class AbstractTreeWatcher |
childEvent, close, start, zookeeperPath |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Process a path string from Zookeeper for the Kafka broker's ID We're expecting paths like: /brokers/ids/1231524312
Process events like NODE_ADDED and NODE_REMOVED to keep an up to date list of brokers
Groovy Documentation