diff --git a/src/main/java/com/xuxd/kafka/console/beans/vo/TopicPartitionVO.java b/src/main/java/com/xuxd/kafka/console/beans/vo/TopicPartitionVO.java
index a8a3f91..c6e8300 100644
--- a/src/main/java/com/xuxd/kafka/console/beans/vo/TopicPartitionVO.java
+++ b/src/main/java/com/xuxd/kafka/console/beans/vo/TopicPartitionVO.java
@@ -33,8 +33,8 @@ public class TopicPartitionVO {
TopicPartitionVO partitionVO = new TopicPartitionVO();
partitionVO.setPartition(partitionInfo.partition());
partitionVO.setLeader(partitionInfo.leader().toString());
- partitionVO.setReplicas(partitionInfo.replicas().stream().map(Node::toString).collect(Collectors.toList()));
- partitionVO.setIsr(partitionInfo.isr().stream().map(Node::toString).collect(Collectors.toList()));
+ partitionVO.setReplicas(partitionInfo.replicas().stream().map(node -> node.host() + ":" + node.port() + " (id: " + node.idString() + ")").collect(Collectors.toList()));
+ partitionVO.setIsr(partitionInfo.isr().stream().map(Node::idString).collect(Collectors.toList()));
return partitionVO;
}
}
diff --git a/src/main/java/com/xuxd/kafka/console/controller/OperationController.java b/src/main/java/com/xuxd/kafka/console/controller/OperationController.java
index e4d06f5..b1b83aa 100644
--- a/src/main/java/com/xuxd/kafka/console/controller/OperationController.java
+++ b/src/main/java/com/xuxd/kafka/console/controller/OperationController.java
@@ -58,4 +58,9 @@ public class OperationController {
public Object configThrottle(@RequestBody BrokerThrottleDTO dto) {
return operationService.configThrottle(dto.getBrokerList(), dto.getUnit().toKb(dto.getThrottle()));
}
+
+ @DeleteMapping("/broker/throttle")
+ public Object removeThrottle(@RequestBody BrokerThrottleDTO dto) {
+ return operationService.removeThrottle(dto.getBrokerList());
+ }
}
diff --git a/src/main/java/com/xuxd/kafka/console/service/OperationService.java b/src/main/java/com/xuxd/kafka/console/service/OperationService.java
index ef10b2c..e797fd1 100644
--- a/src/main/java/com/xuxd/kafka/console/service/OperationService.java
+++ b/src/main/java/com/xuxd/kafka/console/service/OperationService.java
@@ -23,4 +23,6 @@ public interface OperationService {
ResponseData electPreferredLeader(String topic, int partition);
ResponseData configThrottle(List brokerList, long size);
+
+ ResponseData removeThrottle(List brokerList);
}
diff --git a/src/main/java/com/xuxd/kafka/console/service/impl/OperationServiceImpl.java b/src/main/java/com/xuxd/kafka/console/service/impl/OperationServiceImpl.java
index 9ca6850..5898563 100644
--- a/src/main/java/com/xuxd/kafka/console/service/impl/OperationServiceImpl.java
+++ b/src/main/java/com/xuxd/kafka/console/service/impl/OperationServiceImpl.java
@@ -129,4 +129,10 @@ public class OperationServiceImpl implements OperationService {
return (boolean) tuple2._1() ? ResponseData.create().success() : ResponseData.create().failed(tuple2._2());
}
+
+ @Override public ResponseData removeThrottle(List brokerList) {
+ Tuple2
- 解除限流
+
+ 解除限流
+
解除指定broker上的topic副本之间数据同步占用的带宽限制
@@ -94,6 +96,11 @@
@closeConfigThrottleDialog="closeConfigThrottleDialog"
>
+
+
@@ -104,6 +111,7 @@ import OffsetAlignmentTable from "@/views/op/OffsetAlignmentTable";
import ElectPreferredLeader from "@/views/op/ElectPreferredLeader";
import DataSyncScheme from "@/views/op/DataSyncScheme";
import ConfigThrottle from "@/views/op/ConfigThrottle";
+import RemoveThrottle from "@/views/op/RemoveThrottle";
export default {
name: "Operation",
components: {
@@ -113,6 +121,7 @@ export default {
ElectPreferredLeader,
DataSyncScheme,
ConfigThrottle,
+ RemoveThrottle,
},
data() {
return {
@@ -127,6 +136,7 @@ export default {
},
brokerManager: {
showConfigThrottleDialog: false,
+ showRemoveThrottleDialog: false,
},
};
},
@@ -167,6 +177,12 @@ export default {
closeConfigThrottleDialog() {
this.brokerManager.showConfigThrottleDialog = false;
},
+ openRemoveThrottleDialog() {
+ this.brokerManager.showRemoveThrottleDialog = true;
+ },
+ closeRemoveThrottleDialog() {
+ this.brokerManager.showRemoveThrottleDialog = false;
+ },
},
};
diff --git a/ui/src/views/op/RemoveThrottle.vue b/ui/src/views/op/RemoveThrottle.vue
new file mode 100644
index 0000000..27b190e
--- /dev/null
+++ b/ui/src/views/op/RemoveThrottle.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ 全部 {{ v }}
+
+
+
+
+
+ 如何检查是否配置的有限流速率:
+ kafka的限流速率是通过下面这两项配置的:
+
+ - leader.replication.throttled.rate
+ - follower.replication.throttled.rate
+
+ 只需通过
+ 集群->属性配置
+ 查看是否存在这两项配置,如果不存在,便是没有配置限流速率。如果未配置限流速率,即使指定某个topic的分区副本进行限流,没有速率也不限流。
+
+
+
+
+
+
+
+
diff --git a/ui/src/views/topic/PartitionInfo.vue b/ui/src/views/topic/PartitionInfo.vue
index c28f8c4..3028c1f 100644
--- a/ui/src/views/topic/PartitionInfo.vue
+++ b/ui/src/views/topic/PartitionInfo.vue
@@ -12,6 +12,7 @@
-
-
- {{
- i
- }}
-
+ -
+ {{ i }}
+
+
+
+ {{ i }}
+
+