mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
[Optimize]GroupTopic信息修改为实时获取 (#1196)
This commit is contained in:
@@ -26,7 +26,7 @@ public interface GroupManager {
|
||||
String searchGroupKeyword,
|
||||
PaginationBaseDTO dto);
|
||||
|
||||
PaginationResult<GroupTopicOverviewVO> pagingGroupTopicMembers(Long clusterPhyId, String groupName, PaginationBaseDTO dto);
|
||||
PaginationResult<GroupTopicOverviewVO> pagingGroupTopicMembers(Long clusterPhyId, String groupName, PaginationBaseDTO dto) throws Exception;
|
||||
|
||||
PaginationResult<GroupOverviewVO> pagingClusterGroupsOverview(Long clusterPhyId, ClusterGroupSummaryDTO dto);
|
||||
|
||||
|
||||
@@ -118,10 +118,15 @@ public class GroupManagerImpl implements GroupManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaginationResult<GroupTopicOverviewVO> pagingGroupTopicMembers(Long clusterPhyId, String groupName, PaginationBaseDTO dto) {
|
||||
public PaginationResult<GroupTopicOverviewVO> pagingGroupTopicMembers(Long clusterPhyId, String groupName, PaginationBaseDTO dto) throws Exception {
|
||||
long startTimeUnitMs = System.currentTimeMillis();
|
||||
|
||||
Group group = groupService.getGroupFromDB(clusterPhyId, groupName);
|
||||
ClusterPhy clusterPhy = clusterPhyService.getClusterByCluster(clusterPhyId);
|
||||
if (clusterPhy == null) {
|
||||
return PaginationResult.buildFailure(MsgConstant.getClusterPhyNotExist(clusterPhyId), dto);
|
||||
}
|
||||
|
||||
Group group = groupService.getGroupFromKafka(clusterPhy, groupName);
|
||||
|
||||
//没有topicMember则直接返回
|
||||
if (group == null || ValidateUtils.isEmptyList(group.getTopicMembers())) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ClusterGroupsController {
|
||||
@GetMapping(value = "clusters/{clusterPhyId}/groups/{groupName}/topics-overview")
|
||||
public PaginationResult<GroupTopicOverviewVO> getGroupTopicsOverview(@PathVariable Long clusterPhyId,
|
||||
@PathVariable String groupName,
|
||||
PaginationBaseDTO dto) {
|
||||
PaginationBaseDTO dto) throws Exception {
|
||||
return groupManager.pagingGroupTopicMembers(clusterPhyId, groupName, dto);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user