Skip to content

Commit

Permalink
[Optimize]GroupTopic信息修改为实时获取
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao.zeng committed Nov 27, 2023
1 parent 8346453 commit c813241
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PaginationResult<GroupTopicOverviewVO> pagingGroupMembers(Long clusterPhyId,
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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,15 @@ public PaginationResult<GroupTopicOverviewVO> pagingGroupMembers(Long clusterPhy
}

@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())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Result<Set<TopicPartitionKS>> getClusterPhyGroupPartitions(@PathVariable
@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);
}

Expand Down

0 comments on commit c813241

Please sign in to comment.