mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-04 20:02:07 +08:00
Remove __consumer_offsets from topic list
This commit is contained in:
@@ -50,6 +50,8 @@ import java.util.stream.Collectors;
|
|||||||
public class TopicManagerServiceImpl implements TopicManagerService {
|
public class TopicManagerServiceImpl implements TopicManagerService {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(TopicManagerServiceImpl.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(TopicManagerServiceImpl.class);
|
||||||
|
|
||||||
|
private static final String CONSUMER_OFFSETS_TOPIC = "__consumer_offsets";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TopicDao topicDao;
|
private TopicDao topicDao;
|
||||||
|
|
||||||
@@ -275,6 +277,8 @@ public class TopicManagerServiceImpl implements TopicManagerService {
|
|||||||
}
|
}
|
||||||
Map<Long, Map<String, TopicDO>> topicMap = new HashMap<>(appList.size());
|
Map<Long, Map<String, TopicDO>> topicMap = new HashMap<>(appList.size());
|
||||||
for (TopicDO topicDO: topicList) {
|
for (TopicDO topicDO: topicList) {
|
||||||
|
if (topicDO.getTopicName().equals(CONSUMER_OFFSETS_TOPIC))
|
||||||
|
continue;
|
||||||
Map<String, TopicDO> subTopicMap = topicMap.getOrDefault(topicDO.getClusterId(), new HashMap<>());
|
Map<String, TopicDO> subTopicMap = topicMap.getOrDefault(topicDO.getClusterId(), new HashMap<>());
|
||||||
subTopicMap.put(topicDO.getTopicName(), topicDO);
|
subTopicMap.put(topicDO.getTopicName(), topicDO);
|
||||||
topicMap.put(topicDO.getClusterId(), subTopicMap);
|
topicMap.put(topicDO.getClusterId(), subTopicMap);
|
||||||
|
|||||||
Reference in New Issue
Block a user