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