Where does kafka store sections for topics?

I have installed kafka on linux server. I have defined a theme with multiple sections. I know that each section maps to a physical file on disk, but I don't know where it is.
Where are the partition files stored?

+3


source to share


3 answers


In your config / server.properties file you will find the Log Basics section. The property log.dirs

determines where your logs / partitions will be stored on disk.



+12


source


By default on Linux, it is stored in /tmp/kafka-logs

. If you go to this folder, you will see something like this:

  • restore point displacement control points
  • Checkpoint offset replication
  • theme-0
  • message-0
  • MSG-1


This means that you have two topics ( topic

which has 1 section and msg

which has 2).

As noted by Ludd, you can find the location within the file config/server.properties

by searching log.dirs

.

+1


source


Try this command

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic test

      

you will get output

Topic:test  Partition: 0    Leader: 1   Replicas: 1,2,0 Isr: 1,2,0

      

now try going to \config file

cat server.properties

      

and find broker_id

if it broker_id

matches the leader number, then the topics section is saved in this broker

-1


source







All Articles