Search code examples
apache-pulsar

command line tool for checking topic partition -> bookie ledger mapping in Pulsar?


Is there a command line tool that can tell the mapping between Pulsar topic partition and bookie ledgers? The data stored in zookeeper is in binary and is not readable directly.

 get /devpulsar01/managedledgers/logging/benchmark/persistent/test-partition-5

 �n��š�� �ل��-
 �n����ݢ �����-
 �n������ ��ʹ�-
 �n������ ����-
 �o��𪓟 㘗��-
 �o������ �軵�-
 �o������ ����-
 �o���޴� ډ���-
 �o����Ĝ �٩��-
 �o 
 cZxid = 0x500051a00
 ...

Solution

  • we can get the mapping info using pulsar-admin:

    bin/pulsar-admin topics stats-internal logging/benchmark/test-partition-1