Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Optimize]GroupTopic信息修改为实时获取 #1196

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading