Conditional update the persistent path data, return (true, newVersion) if it succeeds, otherwise (the path doesn't exist, the current version is not the expected version, etc.) return (false, -1)
Conditional update the persistent path data, return (true, newVersion) if it succeeds, otherwise (the path doesn't exist, the current version is not the expected version, etc.) return (false, -1)
When there is a ConnectionLossException during the conditional update, zkClient will retry the update and may fail since the previous update may have succeeded (but the stored zkVersion no longer matches the expected one). In this case, we will run the optionalChecker to further check if the previous write did indeed succeeded.
Conditional update the persistent path data, return (true, newVersion) if it succeeds, otherwise (the current version is not the expected version, etc.) return (false, -1).
Conditional update the persistent path data, return (true, newVersion) if it succeeds, otherwise (the current version is not the expected version, etc.) return (false, -1). If path doesn't exist, throws ZkNoNodeException
Create an ephemeral node with the given path and data.
Create an ephemeral node with the given path and data. Throw NodeExistException if node already exists.
Create an persistent node with the given path and data.
Create an persistent node with the given path and data. Create parents if necessary.
Returns all the entities whose configs have been overridden.
This API takes in a broker id, queries zookeeper for the broker metadata and returns the metadata for that broker or throws an exception if the broker dies before the query to zookeeper finishes
This API takes in a broker id, queries zookeeper for the broker metadata and returns the metadata for that broker or throws an exception if the broker dies before the query to zookeeper finishes
The broker id
An optional Broker object encapsulating the broker metadata
returns a sequence id generated by updating BrokerSequenceIdPath in Zk.
returns a sequence id generated by updating BrokerSequenceIdPath in Zk. users can provide brokerId in the config , inorder to avoid conflicts between zk generated seqId and config.brokerId we increment zk seqId by KafkaConfig.MaxReservedBrokerId.
This API should read the epoch in the ISR path.
This API should read the epoch in the ISR path. It is sufficient to read the epoch in the ISR path, since if the leader fails after updating epoch in the leader path and before updating epoch in the ISR path, effectively some other broker will retry becoming leader with the same new epoch value.
Gets the in-sync replicas (ISR) for a specific topic and partition
Gets the assigned replicas (AR) for a specific topic and partition
This API produces a sequence number by creating / updating given path in zookeeper It uses the stat returned by the zookeeper and return the version.
This API produces a sequence number by creating / updating given path in zookeeper It uses the stat returned by the zookeeper and return the version. Every time client updates the path stat.version gets incremented
make sure a persistent path exists in ZK.
make sure a persistent path exists in ZK. Create the path if not exist.
Check if the given path exists
Register brokers with v2 json format (which includes multiple endpoints).
Register brokers with v2 json format (which includes multiple endpoints). This format also includes default endpoints for compatibility with older clients.
Get JSON partition to replica map from zookeeper.
Update the value of a persistent node with the given path and data.
Update the value of a persistent node with the given path and data. create parrent directory if necessary. Never throw NodeExistException.
Update the value of a persistent node with the given path and data.
Update the value of a persistent node with the given path and data. create parrent directory if necessary. Never throw NodeExistException. Return the updated path zkVersion