Skip to main content

Module directory_id

Module directory_id 

Source
Expand description

KIP-858 reserved log-directory ids, transcribed from Kafka’s org.apache.kafka.common.DirectoryId.

A partition’s directories list holds one id per replica. Besides the real ids a broker generates for its log directories, Kafka reserves the first 100 UUIDs (most significant bits 0, least significant bits below 100) and gives three of them a meaning.

Constants§

LOST
DirectoryId.LOST, Uuid(0, 2): the replica’s directory is offline and its id is unknown.
MIGRATING
DirectoryId.MIGRATING, Uuid(0, 0): the replica already lives in some log directory, but nobody recorded which.
UNASSIGNED
DirectoryId.UNASSIGNED, Uuid(0, 1): a new replica that no log directory hosts yet.

Functions§

is_online
DirectoryId.isOnline: whether a replica assigned to dir counts as on an online directory of a broker whose online directories are online_dirs.
reserved
DirectoryId.reserved: true for the first 100 UUIDs, which no broker generates as a log-directory id.