增加分区
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.xuxd.kafka.console.beans.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* kafka-console-ui.
|
||||
*
|
||||
* @author xuxd
|
||||
* @date 2021-10-18 19:55:40
|
||||
**/
|
||||
@Data
|
||||
public class AddPartitionDTO {
|
||||
|
||||
private String topic;
|
||||
|
||||
private int addNum;
|
||||
|
||||
private List<List<Integer>> assignment = new ArrayList<>();
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class NewTopicDTO {
|
||||
private Map<String, String> configs = new HashMap<>();
|
||||
|
||||
public NewTopic toNewTopic() {
|
||||
NewTopic topic = new NewTopic(name, numPartitions, replicationFactor);
|
||||
NewTopic topic = new NewTopic(name.trim(), numPartitions, replicationFactor);
|
||||
if (MapUtils.isNotEmpty(configs)) {
|
||||
topic.configs(configs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user