Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Clarify timestamp field

...

Export Zookeeper Offsets

A utility that retrieve retrieves the offset offsets of broker partitions in ZK and prints to an output file in the following format:

...


required argument [broker-list], [topic]
Option Description
------ -----------
--broker-list <hostname:port,..., REQUIRED: The list of hostname and hostname:port> port of the server to connect to.
--max-wait-ms <Integer: ms> The max amount of time each fetch request waits. (default: 1000)
--offsets <Integer: count> number of offsets returned (default: 1)
--partitions <partition ids> comma separated list of partition ids. If not specified, it will find offsets for all partitions (default)
--time <Long: timestamp in milliseconds / -1(latest) / -2 (earliest) timestamp of the ; offsets before that (earliest)will come before this timestamp, as in getOffsetsBefore  >
--topic <topic> REQUIRED: The topic to get offset offsets from.

Import Zookeeper Offsets

can import offsets for a topic partitions

file formation format is the same as for the export  

/consumers/group1/offsets/topic1/1-0:286894308
/consumers/group1/offsets/topic1/2-0:284803985

...