Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where kafka stores partitions for the topics?

Tags:

apache-kafka

I installed kafka on a linux server. I defined a topic with a few partitions. I know that each partition is mapped to a physical file on disk, but I don't know where it is.
Where are the partition files saved ?

like image 477
gillyb Avatar asked Jan 01 '15 14:01

gillyb


People also ask

Where does Kafka store topic data?

The default log. dir is /tmp/kafka-logs which you may want to change in case your OS has a /tmp directory cleaner. If no log. dir is defined, then it stores the logs under /tmp/kafka-logs/<topic.name>-<topic.

How are Kafka topics stored?

Storage is partitionedKafka topics are partitioned, meaning a topic is spread over a number of “buckets” located on different brokers. This distributed placement of your data is very important for scalability because it allows client applications to read the data from many brokers at the same time.

How are messages stored in topic partitions in Kafka?

Topic partitions contain an ordered set of messages and each message in the partition has a unique offset. Kafka does not track which messages were read by a task or consumer. Consumers must track their own location within each log; the Datastax Connector task store the offsets in config. offset.


1 Answers

In your config/server.properties you'll find a section on "Log Basics". The property log.dirs is defining where your logs/partitions will be stored on disk.

like image 53
Lundahl Avatar answered Oct 09 '22 01:10

Lundahl