Dump Journal Topic Index File

The amps_tx_topic_index_dump utility is used to display the contents of an AMPS transaction log topic index file for debugging.

Command Line Options

The amps_tx_topic_index_dump utility has the following options available. These can also be printed to the screen by providing the -help option to the utility.

The utility requires one of the options (topic, topic-hash, or message-type) to produce output.

Option

Description

filename (required)

Filename of the AMPS transaction log topic index file.

-h, --help

Show the program help message and quit.

--topic-hash

Display offset list for a given topic.

--topic

Display offset list for topic.

--message-type

Message type of topic used to produce topic hash.

Looking at the Output

The output of the utility is a representation of the index. Notice that, since the index is optimized for speed and is only intended to be used to reference journal files, the index contains minimal information.

For example, the following dump shows the results from a topic where only three messages are present in the transaction log:

AMPS tx topic index dump:
 topic hash:    12596264898761041958
 transition[0]: 18446744073709551615
 txid[1]:       1711058031000000105
 journal[2]:    0
 offset[3]:     29696
 offset[4]:     30976
 transition[5]: 18446744073709551615
 txid[6]:       1711058031000999830
 journal[7]:    24
 offset[8]:     4411904

This shows the topic hash used in the transaction log, and information about the journals.

In this case, messages are found in journal 0 and journal 24.

The first message in journal 0 has local transaction id 1711058031000000105. The messages in that journal file are at offset 29596 and offset 30976 within the file.

The other message is found in journal 24, with local transaction id 1711058031000999830 and is at offset 4411904 in the file.

Notice that the "transition" indicators are output to indicate the start of an index record for a different journal file. Also notice that the index contains no information about journals that do not contain messages for that topic, nor do they contain any information about the messages other than that needed to quickly locate messages for a given topic.

Last updated

Copyright 2013-2024 60East Technologies, Inc.