JNSimba commented on code in PR #173:
URL: 
https://github.com/apache/doris-spark-connector/pull/173#discussion_r1436211494


##########
spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java:
##########
@@ -561,48 +583,77 @@ static List<BackendRow> parseBackend(String response, 
Logger logger) throws Dori
     }
 
     /**
-     * get Doris BE node list.
+     * get Doris BE nodes.
      * @param logger slf4j logger
-     * @return the Doris BE node list
+     * @return the Doris BE node
      * @throws IllegalArgumentException BE nodes is illegal
      */
-    @VisibleForTesting
-    public static List<BackendV2.BackendRowV2> getBackendRows(SparkSettings 
sparkSettings,  Logger logger) throws DorisException {
-        List<String> feNodeList = 
allEndpoints(sparkSettings.getProperty(DORIS_FENODES), logger);
-        for (String feNode : feNodeList){
+    public static List<BackendV2.BackendRowV2> getBeNodes(SparkSettings 
sparkSettings, Logger logger) throws DorisException {
+        List<String> backends = 
allBeEndpoints(sparkSettings.getProperty(DORIS_BENODES),logger);
+        List<BackendV2.BackendRowV2> backendRowV2s = new 
ArrayList<BackendV2.BackendRowV2>();
+        if (backends == null || backends.isEmpty()) {
+            logger.error(ILLEGAL_ARGUMENT_MESSAGE, "beNodes", backends);
+            throw new IllegalArgumentException("beNodes", 
String.valueOf(backends));

Review Comment:
   We can change it to the same as the configuration, lowercase to prevent 
users from ambiguity



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to