...
When running kafka-metadata-quorum script to get the quorum replication status, the LastFetchTimestamp and LastCaughtUpTimestamp output is not human-readable.
I will It would be convenient to add an optional flag (-hr, --human-readable) to enable a human-readable format showing the operation delay in ms (i.e. 366 ms ago).
This dealy delay is computed as (now - timestamp), where they are both represented as Unix time (UTC based).
...
A new optional flag called --human-readable with the shortcut -hr will be added to the kafka-metadata-quorum tool.
Code Block | ||
---|---|---|
| ||
$ bin/kafka-metadata-quorum.sh describe -h usage: kafka-metadata-quorum --bootstrap-server BOOTSTRAP_SERVER describe [-h] [--status] [--replication] [--human-hrreadable] optional arguments: -h, --help show this help message and exit Status: --status A short summary of the quorum status and the other provides detailed information about the status of replication. Replication: --replication Detailed information about the status of replication -hr, --human-readable Print human Human-readable timestampsoutput |
Proposed Changes
The current default --replication output is as follows and will remain unchanged.
...
Instead, when passing the new flag, we will have the following output (note how argparse4j support abbreviations).
Code Block | ||
---|---|---|
| ||
$ bin/kafka-metadata-quorum.sh --bootstrap-server :9092 describe --replication --human-hrreadable NodeId LogEndOffset Lag LastFetchTimestamp LastCaughtUpTimestamp Status 2 86098689 0 4 ms ago 4 ms ago Leader 3 86098689 0 155148 ms ago 155148 ms ago Follower 4 86098689 0 155148 ms ago 155148 ms ago Follower $ bin/kafka-metadata-quorum.sh --bootstrap-serverboot :9092 describe --replicationre --human-readablehu NodeId LogEndOffset Lag LastFetchTimestamp LastCaughtUpTimestamp Status 2 868961 0 45 ms ago 45 ms ago Leader 3 868961 0 14856 ms ago 14856 ms ago Follower 4 868961 0 14856 ms ago 14856 ms ago Follower |
Compatibility, Deprecation, and Migration Plan
...