You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/26 13:37:07 UTC

[GitHub] [incubator-doris] stalary commented on a diff in pull request #9172: [enhancement](k8s) Support k8s_container_drift_mode for be and broker in k8s enviroment

stalary commented on code in PR #9172:
URL: https://github.com/apache/incubator-doris/pull/9172#discussion_r858723881


##########
fe/fe-core/src/main/java/org/apache/doris/alter/SystemHandler.java:
##########
@@ -189,15 +188,15 @@ private List<Backend> checkDecommission(DecommissionBackendClause decommissionBa
      * 2. after decommission, the remaining backend num should meet the replication num.
      * 3. after decommission, The remaining space capacity can store data on decommissioned backends.
      */
-    public static List<Backend> checkDecommission(List<Pair<String, Integer>> hostPortPairs)
+    public static List<Backend> checkDecommission(List<Triple<String, String, Integer>> ipHostPortTriples)
             throws DdlException {
         SystemInfoService infoService = Catalog.getCurrentSystemInfo();
         List<Backend> decommissionBackends = Lists.newArrayList();
         // check if exist
-        for (Pair<String, Integer> pair : hostPortPairs) {
-            Backend backend = infoService.getBackendWithHeartbeatPort(pair.first, pair.second);
+        for (Triple<String, String, Integer> triple : ipHostPortTriples) {
+            Backend backend = infoService.getBackendWithHeartbeatPort(triple.getLeft(), triple.getMiddle(), triple.getRight());
             if (backend == null) {
-                throw new DdlException("Backend does not exist[" + pair.first + ":" + pair.second + "]");
+                throw new DdlException("Backend does not exist[" + triple.getLeft() + ":" + triple.getLeft() + "]");

Review Comment:
   `triple.getLeft()` repeat?



-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org