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/04/21 11:52:57 UTC

[GitHub] [incubator-inlong] kipshi opened a new pull request, #3878: [INLONG-3855][Manager] Add lightWeight mode for group

kipshi opened a new pull request, #3878:
URL: https://github.com/apache/incubator-inlong/pull/3878

   ### Title Name:[INLONG-3855][Manager] Add lightWeight mode for group
   
   where *XYZ* should be replaced by the actual issue number.
   
   Fixes #3855 
   
   ### Motivation
   
   ### Modifications
   
   ### 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] [incubator-inlong] healchow commented on a diff in pull request #3878: [INLONG-3855][Manager] Add lightWeight mode for group

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


##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongGroupTransfer.java:
##########
@@ -49,20 +50,35 @@
 
 public class InlongGroupTransfer {
 
-    public static InlongGroupConf parseGroupResponse(InlongGroupResponse groupResponse) {
+    public static InlongGroupConf parseGroupResponse(InlongGroupResponse inlongGroupResponse) {
         InlongGroupConf inlongGroupConf = new InlongGroupConf();
-        inlongGroupConf.setGroupName(groupResponse.getName());
-        inlongGroupConf.setDescription(groupResponse.getDescription());
-        inlongGroupConf.setCnName(groupResponse.getCnName());
-        inlongGroupConf.setZookeeperEnabled(groupResponse.getZookeeperEnabled() == 1);
-        inlongGroupConf.setDailyRecords(Long.valueOf(groupResponse.getDailyRecords()));
-        inlongGroupConf.setPeakRecords(Long.valueOf(groupResponse.getPeakRecords()));
-        inlongGroupConf.setMqBaseConf(parseMqBaseConf(groupResponse));
-        inlongGroupConf.setSortBaseConf(parseSortBaseConf(groupResponse));
-        inlongGroupConf.setProxyClusterId(groupResponse.getProxyClusterId());
+        inlongGroupConf.setGroupName(inlongGroupResponse.getName());
+        inlongGroupConf.setDescription(inlongGroupResponse.getDescription());
+        inlongGroupConf.setCnName(inlongGroupResponse.getCnName());
+        inlongGroupConf.setLightWeight(isLightGroup(inlongGroupResponse));

Review Comment:
   It is recommended to name the method `setLightweight`.



##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongGroupTransfer.java:
##########
@@ -49,20 +50,35 @@
 
 public class InlongGroupTransfer {
 
-    public static InlongGroupConf parseGroupResponse(InlongGroupResponse groupResponse) {
+    public static InlongGroupConf parseGroupResponse(InlongGroupResponse inlongGroupResponse) {
         InlongGroupConf inlongGroupConf = new InlongGroupConf();
-        inlongGroupConf.setGroupName(groupResponse.getName());
-        inlongGroupConf.setDescription(groupResponse.getDescription());
-        inlongGroupConf.setCnName(groupResponse.getCnName());
-        inlongGroupConf.setZookeeperEnabled(groupResponse.getZookeeperEnabled() == 1);
-        inlongGroupConf.setDailyRecords(Long.valueOf(groupResponse.getDailyRecords()));
-        inlongGroupConf.setPeakRecords(Long.valueOf(groupResponse.getPeakRecords()));
-        inlongGroupConf.setMqBaseConf(parseMqBaseConf(groupResponse));
-        inlongGroupConf.setSortBaseConf(parseSortBaseConf(groupResponse));
-        inlongGroupConf.setProxyClusterId(groupResponse.getProxyClusterId());
+        inlongGroupConf.setGroupName(inlongGroupResponse.getName());
+        inlongGroupConf.setDescription(inlongGroupResponse.getDescription());
+        inlongGroupConf.setCnName(inlongGroupResponse.getCnName());
+        inlongGroupConf.setLightWeight(isLightGroup(inlongGroupResponse));
+        inlongGroupConf.setZookeeperEnabled(inlongGroupResponse.getZookeeperEnabled() == 1);
+        inlongGroupConf.setDailyRecords(Long.valueOf(inlongGroupResponse.getDailyRecords()));
+        inlongGroupConf.setPeakRecords(Long.valueOf(inlongGroupResponse.getPeakRecords()));
+        inlongGroupConf.setMqBaseConf(parseMqBaseConf(inlongGroupResponse));
+        inlongGroupConf.setSortBaseConf(parseSortBaseConf(inlongGroupResponse));
+        inlongGroupConf.setProxyClusterId(inlongGroupResponse.getProxyClusterId());
         return inlongGroupConf;
     }
 
+    public static boolean isLightGroup(InlongGroupResponse inlongGroupResponse) {
+        List<InlongGroupExtInfo> extInfos = inlongGroupResponse.getExtList();
+        if (CollectionUtils.isEmpty(extInfos)) {
+            return false;
+        }
+        for (InlongGroupExtInfo extInfo : extInfos) {

Review Comment:
   From my side, the mode of lightweight is an important config, maybe we can add this param into InlongGroup?



-- 
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] [incubator-inlong] healchow merged pull request #3878: [INLONG-3855][Manager] Add lightweight mode for inlong group

Posted by GitBox <gi...@apache.org>.
healchow merged PR #3878:
URL: https://github.com/apache/incubator-inlong/pull/3878


-- 
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