Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explain replication-offset-checkpoint AND recovery-point-offset in Kafka

Can Some explain what these files means, present inside kafka broker logs.

root@a2md23297l:/tmp/kafka-logs-1# cat recovery-point-offset-checkpoint
0
5
my-topic 0 0
kafkatopic_R2P1_1 0 0
my-topic 1 0
kafkatopic_R2P1 0 0
test 0 0
root@a2md23297l:/tmp/kafka-logs-1# cat replication-offset-checkpoint
0
5
my-topic 0 0
kafkatopic_R2P1_1 0 2
my-topic 1 0
kafkatopic_R2P1 0 2
test 0 57

Fyi, my-topic,kafkatopic_R2P1_1,my-topic,kafkatopic_R2P1,test are the topics created. Thanks in advance.

like image 308
Nilotpal Avatar asked Feb 15 '16 10:02

Nilotpal


2 Answers

AFAIK: recovery-point-offset-checkpoint is the internal broker log where Kafka tracks which messages (from-to offset) were successfully checkpointed to disk.

replication-offset-checkpoint is the internal broker log where Kafka tracks which messages (from-to offset) were successfully replicated to other brokers.

For more details you can take a deeper look at: kafka/core/src/main/scala/kafka/server/LogOffsetMetadata.scala and ReplicaManager.scala. The code is commented pretty well.

like image 123
Marko Bonaci Avatar answered Sep 22 '22 14:09

Marko Bonaci


Marko is spot on.

the starting two numbers (0- Not sure what this is) (5-Number of partitions that are present on that particular disk)

Numbers next to the topic name(0- Partition number of the topic) next number is the offset which was flushed to the disk(recovery-point-offset-checpoint) and in replication-offset-checkpoint last offset which the replicas were successfully replicated the data

like image 45
armourbear Avatar answered Sep 21 '22 14:09

armourbear