变更副本信息

This commit is contained in:
许晓东
2021-11-20 22:35:38 +08:00
parent 7a98eb479f
commit a219551802
3 changed files with 86 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
package com.xuxd.kafka.console.controller;
import com.xuxd.kafka.console.beans.ReplicaAssignment;
import com.xuxd.kafka.console.beans.dto.AddPartitionDTO;
import com.xuxd.kafka.console.beans.dto.NewTopicDTO;
import com.xuxd.kafka.console.beans.enums.TopicType;
@@ -71,8 +72,14 @@ public class TopicController {
return topicService.addPartitions(topic, addNum, assignment);
}
@GetMapping("/replica/assignment")
public Object getCurrentReplicaAssignment(@RequestParam String topic) {
return topicService.getCurrentReplicaAssignment(topic);
}
@PostMapping("/replica/assignment")
public Object updateReplicaAssignment(@RequestBody ReplicaAssignment assignment) {
return "topicService.getCurrentReplicaAssignment(topic)";
}
}