Kafka log structure overview

The log is one of the important components of the Kafka server code. Many other core components are based on the log. The state machine and copy management will be explained later.

A series of 0s in the log file is the starting offset value of the log segment, which is the base offset.

The organization directory structure of Kafka logs on disk is shown in the figure below.

The log contains multiple log segments, and each log segment contains: a message log file, a displacement index file, a time stamp index file, and a terminated transaction index file. The source code of the Kafa log module will be analyzed in detail later.

 

Guess you like

Origin www.cnblogs.com/cnxieyang/p/12731022.html