mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
修复topic管理中topic编辑备注没有数据回显问题
This commit is contained in:
@@ -25,6 +25,8 @@ public class MineTopicSummary {
|
||||
|
||||
private Integer access;
|
||||
|
||||
private String description;
|
||||
|
||||
public Long getLogicalClusterId() {
|
||||
return logicalClusterId;
|
||||
}
|
||||
@@ -105,6 +107,14 @@ public class MineTopicSummary {
|
||||
this.access = access;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MineTopicSummary{" +
|
||||
|
||||
@@ -36,6 +36,9 @@ public class TopicMineVO {
|
||||
@ApiModelProperty(value = "状态, 0:无权限, 1:可消费 2:可发送 3:可消费发送 4:可管理")
|
||||
private Integer access;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String description;
|
||||
|
||||
public Long getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
@@ -108,6 +111,14 @@ public class TopicMineVO {
|
||||
this.access = access;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TopicMineVO{" +
|
||||
|
||||
@@ -210,7 +210,7 @@ public class TopicManagerServiceImpl implements TopicManagerService {
|
||||
}
|
||||
}
|
||||
|
||||
// 增加流量信息
|
||||
// 增加流量和描述信息
|
||||
Map<Long, Map<String, TopicMetrics>> metricMap = KafkaMetricsCache.getAllTopicMetricsFromCache();
|
||||
for (MineTopicSummary mineTopicSummary : summaryList) {
|
||||
TopicMetrics topicMetrics = getTopicMetricsFromCacheOrJmx(
|
||||
@@ -219,6 +219,10 @@ public class TopicManagerServiceImpl implements TopicManagerService {
|
||||
metricMap);
|
||||
mineTopicSummary.setBytesIn(topicMetrics.getSpecifiedMetrics("BytesInPerSecOneMinuteRate"));
|
||||
mineTopicSummary.setBytesOut(topicMetrics.getSpecifiedMetrics("BytesOutPerSecOneMinuteRate"));
|
||||
|
||||
// 增加topic描述信息
|
||||
TopicDO topicDO = topicDao.getByTopicName(mineTopicSummary.getPhysicalClusterId(), mineTopicSummary.getTopicName());
|
||||
mineTopicSummary.setDescription(topicDO.getDescription());
|
||||
}
|
||||
return summaryList;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public class TopicMineConverter {
|
||||
vo.setClusterName(data.getLogicalClusterName());
|
||||
vo.setBytesIn(data.getBytesIn());
|
||||
vo.setBytesOut(data.getBytesOut());
|
||||
vo.setDescription(data.getDescription());
|
||||
voList.add(vo);
|
||||
}
|
||||
return voList;
|
||||
|
||||
Reference in New Issue
Block a user