JNSimba commented on code in PR #187:
URL: 
https://github.com/apache/doris-flink-connector/pull/187#discussion_r1308249874


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/sink/BackendUtil.java:
##########
@@ -19,30 +19,55 @@
 
 import org.apache.doris.flink.exception.DorisRuntimeException;
 import org.apache.doris.flink.rest.models.BackendV2;
+import org.apache.doris.flink.rest.models.BackendV2.BackendRowV2;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 public class BackendUtil {
     private static final Logger LOG = 
LoggerFactory.getLogger(BackendUtil.class);
-    private final List<BackendV2.BackendRowV2> backends;
+    private List<BackendV2.BackendRowV2> backends;
     private long pos;
 
     public BackendUtil(List<BackendV2.BackendRowV2> backends) {
         this.backends = backends;
         this.pos = 0;
     }
 
+    public BackendUtil(String beNodes) {
+        this.backends = initBackends(beNodes);
+        this.pos = 0;
+    }
+
+    public List<BackendV2.BackendRowV2> initBackends(String beNodes) {

Review Comment:
   private might be better?



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

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


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

Reply via email to