BrokerIdZNode
utility is used to decode or encode broker metadata for KafkaZkClient.
decode(
id: Int,
jsonBytes: Array[Byte]): BrokerInfo
decode
…FIXME
Note
|
decode is used when KafkaZkClient is requested to getAllBrokersInCluster, getAllBrokerAndEpochsInCluster, and getBroker.
|
encode(
brokerInfo: BrokerInfo): Array[Byte] // (1)
encode(
version: Int,
host: String,
port: Int,
advertisedEndpoints: Seq[EndPoint],
jmxPort: Int,
rack: Option[String]): Array[Byte]
-
Uses the given
BrokerInfo
for the arguments of the otherencode
encode
…FIXME