You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/11/29 17:11:35 UTC

[GitHub] [inlong] vernedeng opened a new pull request, #6677: [INLONG-6676][Sort] Support list all InlongTopicInfo under a given cluster tag

vernedeng opened a new pull request, #6677:
URL: https://github.com/apache/inlong/pull/6677

   - Fixes #6676
   
   ### Motivation
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve?*
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [ ] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
vernedeng commented on code in PR #6677:
URL: https://github.com/apache/inlong/pull/6677#discussion_r1045247095


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java:
##########
@@ -415,6 +417,28 @@ public void saveOrUpdateExt(String groupId, List<InlongGroupExtInfo> exts) {
         LOGGER.info("success to save or update inlong group ext for groupId={}", groupId);
     }
 
+    @Override
+    public List<InlongGroupTopicInfo> listTopics(InlongGroupTopicRequest request) {
+        LOGGER.info("start to list group topic infos, request={}", request);
+        Preconditions.checkNotEmpty(request.getClusterTag(), "cluster tag should not be empty");
+        List<InlongGroupEntity> groupEntities = groupMapper.selectByClusterTag(request.getClusterTag());

Review Comment:
   fixed, thx



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang merged pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #6677:
URL: https://github.com/apache/inlong/pull/6677


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #6677:
URL: https://github.com/apache/inlong/pull/6677#discussion_r1038982208


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java:
##########
@@ -95,6 +97,12 @@ public Response<InlongGroupTopicInfo> getTopic(@PathVariable String groupId) {
         return Response.success(groupService.getTopic(groupId));
     }
 
+    @GetMapping(value = "/group/listTopicsByTag/{clusterTag}")

Review Comment:
   It is written as `@PostMapping(value = "/group/listTopics")`, and receives a request body like `/group/list`, which can facilitate the extension of parameters other than `clusterTag`, such as querying by a list of `groupId`.
   
   If you do not modify it this way, then if you need to query the topic list according to the `groupId` or another field in the future, you need to add another API to support it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
vernedeng commented on code in PR #6677:
URL: https://github.com/apache/inlong/pull/6677#discussion_r1040349661


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java:
##########
@@ -95,6 +97,12 @@ public Response<InlongGroupTopicInfo> getTopic(@PathVariable String groupId) {
         return Response.success(groupService.getTopic(groupId));
     }
 
+    @GetMapping(value = "/group/listTopicsByTag/{clusterTag}")

Review Comment:
   Got it, thx, I will fix it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #6677:
URL: https://github.com/apache/inlong/pull/6677#discussion_r1035463506


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java:
##########
@@ -95,6 +97,12 @@ public Response<InlongGroupTopicInfo> getTopic(@PathVariable String groupId) {
         return Response.success(groupService.getTopic(groupId));
     }
 
+    @GetMapping(value = "/group/listTopicsByTag/{clusterTag}")

Review Comment:
   Perhaps `listTopics` is better for adding other query parameters.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #6677:
URL: https://github.com/apache/inlong/pull/6677#discussion_r1043245195


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java:
##########
@@ -415,6 +417,28 @@ public void saveOrUpdateExt(String groupId, List<InlongGroupExtInfo> exts) {
         LOGGER.info("success to save or update inlong group ext for groupId={}", groupId);
     }
 
+    @Override
+    public List<InlongGroupTopicInfo> listTopics(InlongGroupTopicRequest request) {
+        LOGGER.info("start to list group topic infos, request={}", request);
+        Preconditions.checkNotEmpty(request.getClusterTag(), "cluster tag should not be empty");
+        List<InlongGroupEntity> groupEntities = groupMapper.selectByClusterTag(request.getClusterTag());

Review Comment:
   This operation has poor performance. It is recommended to filter the query data directly in SQL according to the request parameters.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #6677:
URL: https://github.com/apache/inlong/pull/6677#discussion_r1042287801


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java:
##########
@@ -95,6 +97,12 @@ public Response<InlongGroupTopicInfo> getTopic(@PathVariable String groupId) {
         return Response.success(groupService.getTopic(groupId));
     }
 
+    @GetMapping(value = "/group/listTopicsByTag/{clusterTag}")

Review Comment:
   Are you still working on this PR?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #6677: [INLONG-6676][Manager] Support list all InlongTopicInfo under a given cluster tag

Posted by GitBox <gi...@apache.org>.
vernedeng commented on code in PR #6677:
URL: https://github.com/apache/inlong/pull/6677#discussion_r1038910209


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java:
##########
@@ -95,6 +97,12 @@ public Response<InlongGroupTopicInfo> getTopic(@PathVariable String groupId) {
         return Response.success(groupService.getTopic(groupId));
     }
 
+    @GetMapping(value = "/group/listTopicsByTag/{clusterTag}")

Review Comment:
   You mean ` @GetMapping(value = "/group/listTopics/{clusterTag}")` ?
   Maybe it will be confused with the method to list all topics by groupId?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org