Kafka-partition-concept, Leader mechanism, modified copy, partition allocation strategy-white notes (5)

1 partition

1.1 Copy mechanism

 

1.2 Regional Leader Election

1.3 Partition reallocation

Specific steps

Step 1: We create a cluster with three nodes (copy the installation package and change the broker.id and log.dir paths of service.properties)

From the above output, we can see that the topic heima-par has three partitions and three copies.

Step 2: Add another section to the topic heima-par

Step 3: Add another broker node

Step 4: Reallocate

 

 Execute allocation strategy

View the progress of partition reallocation

 Final effect: 4 partitions are evenly distributed to 4 nodes.

1.4 Modify the copy factor

1.5 partition allocation strategy

Theoretical concepts, understand and understand.

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/h4241778/article/details/108429825
Recommended