OS Manuals

/usr/bin/kafka-dump-log.sh

Community edition of Confluent Kafka.

From confluent-kafka 8.4.0.215-r1 (os), captured 2026-11-05 by running kafka-dump-log.sh --help (exit 1). permalink

This tool helps to parse a log file and dump its contents to the console, useful for debugging a seemingly corrupt log segment.
Option                               Description
------                               -----------
--cluster-metadata-decoder           If set, log data will be parsed as cluster
                                       metadata records.
--deep-iteration                     If set, uses deep instead of shallow
                                       iteration. Automatically set if print-
                                       data-log is enabled.
--files <String: file1, file2, ...>  REQUIRED: The comma separated list of data
                                       and index log files to be dumped.
--help                               Print usage information.
--index-sanity-check                 If set, just checks the index sanity
                                       without printing its content. This is
                                       the same check that is executed on
                                       broker startup to determine if an index
                                       needs rebuilding or not.
--key-decoder-class [String]         If set, used to deserialize the keys. This
                                       class should implement org.apache.kafka.
                                       tools.api.Decoder trait. Custom jar
                                       should be available in kafka/libs
                                       directory. (default: org.apache.kafka.
                                       tools.api.StringDecoder)
--max-bytes <Integer: size>          Limit the amount of total batches read in
                                       bytes avoiding reading the whole .log
                                       file(s). (default: 2147483647)
--max-message-size <Integer: size>   Size of largest message. (default: 5242880)
--offsets-decoder                    If set, log data will be parsed as offset
                                       data from the __consumer_offsets topic.
--print-data-log                     If set, printing the messages content when
                                       dumping data logs. Automatically set if
                                       any decoder option is specified.
--remote-log-metadata-decoder        If set, log data will be parsed as
                                       TopicBasedRemoteLogMetadataManager
                                       (RLMM) metadata records. Instead, the
                                       value-decoder-class option can be used
                                       if a custom RLMM implementation is
                                       configured.
--share-group-state-decoder          If set, log data will be parsed as share
                                       group state data from the
                                       __share_group_state topic.
--skip-record-metadata               Skip metadata when printing records. This
                                       flag also skips control records.
--transaction-log-decoder            If set, log data will be parsed as
                                       transaction metadata from the
                                       __transaction_state topic.
--value-decoder-class [String]       If set, used to deserialize the messages.
                                       This class should implement org.apache.
                                       kafka.tools.api.Decoder trait. Custom
                                       jar should be available in kafka/libs
                                       directory. (default: org.apache.kafka.
                                       tools.api.StringDecoder)
--verify-index-only                  If set, just verify the index log without
                                       printing its content.
--version                            Display Kafka version.
Options (17)
OptionDescriptionSource
--cluster-metadata-decoderIf set, log data will be parsed as cluster metadata records.help
--deep-iterationIf set, uses deep instead of shallow iteration.help
--files String:REQUIRED: The comma separated list of data and index log files to be dumped.help
--helpPrint usage information.help
--index-sanity-checkIf set, just checks the index sanity without printing its content.help
--key-decoder-class StringIf set, used to deserialize the keys.help
--max-bytes Integer:Limit the amount of total batches read in bytes avoiding reading the whole .log file(s).help
--max-message-size Integer:Size of largest message.help
--offsets-decoderIf set, log data will be parsed as offset data from the __consumer_offsets topic.help
--print-data-logIf set, printing the messages content when dumping data logs.help
--remote-log-metadata-decoderIf set, log data will be parsed as TopicBasedRemoteLogMetadataManager (RLMM) metadata records.help
--share-group-state-decoderIf set, log data will be parsed as share group state data from the __share_group_state topic.help
--skip-record-metadataSkip metadata when printing records.help
--transaction-log-decoderIf set, log data will be parsed as transaction metadata from the __transaction_state topic.help
--value-decoder-class StringIf set, used to deserialize the messages.help
--verify-index-onlyIf set, just verify the index log without printing its content.help
--versionDisplay Kafka version.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.