wuxiansen commented on code in PR #9968:
URL: https://github.com/apache/seatunnel/pull/9968#discussion_r2497676088


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/LogService.java:
##########
@@ -70,15 +73,22 @@ public List<Tuple3<String, String, String>> 
allLogNameList(String jobId) {
                 systemMonitoringInformation -> {
                     String host = 
systemMonitoringInformation.asObject().get("host").asString();
                     String url = "http://"; + host + ":" + port + contextPath;
-                    String allName = sendGet(url + REST_URL_GET_ALL_LOG_NAME);
-                    if (StringUtils.isBlank(allName)) {
+                    String logUrl = url + REST_URL_GET_ALL_LOG_NAME;
+
+                    String allName =
+                            httpConfig.isEnableBasicAuth()
+                                    ? sendGet(logUrl, result.basicUser, 
result.basicPass)
+                                    : sendGet(logUrl);
+
+                    if (allName == null || allName.trim().isEmpty()) {

Review Comment:
   Removed HttpBasic object. Optimized :
   ```java
   
                       String allName =
                               httpConfig.isEnableBasicAuth()
                                       ? sendGet(
                                               logUrl,
                                               
httpConfig.getBasicAuthUsername(),
                                               
httpConfig.getBasicAuthPassword())
                                       : sendGet(logUrl);
   
                       if (StringUtils.isBlank(allName)) {
                           log.warn(
                                   "GET {} returned empty body (null/empty). 
Skip this node.", logUrl);
                           return;
                       }
   ```



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

Reply via email to