Hello, I am having some issues understanding the “/tmp/kraft-combined-logs/__cluster_metadata-0/00000000000000000000.log” structure, which, according to my (limited) understanding, will provide the mapping from the topic UUID to the topic name.
I have already parsed the content with the Message Format, but I am struggling to find any information on the value structure.
I think this should be the correct file, as it fits both criteria: the empty partition name and the topic UUID requested seem to be contained in it.
Could you please provide me with more documentation on parsing that value block?
Thank you very much on this great challenge
Hey @TheBlueFireFox, feel free to use BinSpec to check the value structure.
Additionally, you can add these lines to .codecrafters/run.sh to print a hex dump:
@andy1li
I apologize for the misunderstanding, what I meant is the structure of the blue blocks.
As there are more records then just these topic related entries.
(Plus thanks for the link, it’s really useful)
Thanks for the clarification!
As there are more records then just these topic related entries.
@TheBlueFireFox Would you mind sharing a few examples of records you’re referring to?
Here is a pastebin of the full parsed “__cluster_metadata-0/00000000000000000000.log” file.
As you might be able to see, every “value” array in a record is different.
Some have a topic name in it (ex, line 86: 98, 97, 122 => baz), others do not.
So, I am trying to determine the structure of these value arrays.
I just realized that the binspec you (@andy1li) linked shows the structure for the value field, which I have been searching for. So every “Record value” belongs to one of the following Record types.
- Topic Record
- Partition Record
- Feature Level Record
Feel free to dive deeper into the details here:
Thank you very much for your help