You can perform several tasks with topic partitions. The icons on the screen have the following functions:
- Increase the number of partitions
- Move partitions
- Determine leader election
- Reallocate partitions (Smart partition reallocation)
- Change the replication factor
- Download the list of partitions
Increase the number of partitions
Use the Increase Partitions button to increase the number of partitions. The number of partitions can only be increased. The only way to reduce the number is to delete the topic and create it again, so you must set it carefully.
Move partitions
Identical partitions cannot be placed on the same broker.
If the number of replicas of a topic and the number of brokers are the same, the function cannot be used.
Click the Reassign Partitions button to move specific partitions to a different broker. Click on a partition and drag it to move it to the desired broker. We do not recommend moving partitions when there is a large number of partitions.
Leader election
Click to elect a partition leader. When electing a partition leader, choosing the Preferred leader election type is recommended, so that only partitions that exist in the ISR (list of synchronized partition replicas with the most recent data) can be elected leader.
If you choose the Unclean type, a partition that does not exist in the ISR (list of synchronized partition replicas with the most recent data) can be elected leader. This can cause data loss and is not recommended unless you are in a situation where you need to change leaders, even if it does not guarantee up to date data.
Using the Designate a leader broker for re-election option, you can position the partition's leader broker to another broker that has a replica, and then re-elect the leader. If you want to move the partition leader to a non-replica broker, use manual partition relocation.
Select the New Leader Broker from the list. Then click Partition leader election.
Smart partition reallocation
If the number of replicas of a topic and the number of brokers are the same, the function cannot be used.
Click to allow mKC to perform smart partition reallocation.
All partitions of the topic are appropriately relocated, taking into account the disk usage of each broker.
Only one reallocation operation can be performed at a time. Make sure there are no other reallocation tasks and move on to the next step.
Change the replication factor
Click to change the replication factor,. Read the warning displayed. If you want to change the replication factor, update the factor and set the Throttle bytes. Click Change.
Download the list of partitions
You can download the list of partitions using the download button . Partitions can be downloaded using the download (Export) button and choosing a file format. Two formats are supported for downloaded files: CSV and JSON.
The file is downloaded to your local Downloads folder. Its name reflects the cluster and topic from which it came, and includes a date stamp.