liveBook · Manning

Log segment

A log segment is a file-backed portion of a Kafka partition log containing a contiguous range of records and associated indexes.

How 2 Manning books explain it

Apache Kafka in Action

A log segment is a file containing a contiguous portion of the records in a Kafka partition log.

How it is used
Organizes a growing Kafka partition log into files that brokers append to and can later clean up.
How deep it goes
Explains segment files, offset-based names, inspection and rolling controls; defers the fuller treatment of cleanup.
Examples
Uses kafka-dump-log.sh output, a segment.ms configuration command and a partition-directory listing with successive .log files.
What you can do after
Operate/configure it by inspecting segment files, adjusting topic rolling limits and producing a message to trigger a roll check.

Read how Apache Kafka in Action explains log segment →

Kafka Streams in Action, Second Edition

A Kafka log segment is a file-backed portion of a partition's append-only log that contains a contiguous range of records along with its indexes.

How it is used
Uses segments to bound partition files, serve offset-based reads, and apply retention without scanning one monolithic log.
How deep it goes
Explains rolling triggers, directory files, relative offsets, binary search, and segment deletion, but not segment implementation code.
Examples
Uses purchases-0 directory listings, numbered segment files, and active-segment rollover to illustrate storage.
What you can do after
Evaluate/understand how Kafka locates records, rolls partition files, and removes segments under retention settings.

Read how Kafka Streams in Action, Second Edition explains log segment →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.