fuweng11 commented on code in PR #11545:
URL: https://github.com/apache/inlong/pull/11545#discussion_r1856913120
##########
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleEngine.java:
##########
@@ -86,10 +84,11 @@ public void init() {
this.projectBaseUrl = dolphinUrl + DS_PROJECT_URL;
}
- public DolphinScheduleEngine(String host, int port, String username,
String password, String dolphinUrl,
+ public DolphinScheduleEngine(String inlongManagerHost, int
inlongManagerPort, String username, String password,
+ String dolphinUrl,
String token) {
- this.host = host;
- this.port = port;
+ this.inlongManagerUrl =
+
inlongManagerHost.concat(InlongConstants.COLON).concat(String.valueOf(inlongManagerPort));
Review Comment:
```suggestion
this.inlongManagerUrl = inlongManagerHost + InlongConstants.COLON +
String.valueOf(inlongManagerPort);
```
##########
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/config/AirflowConfig.java:
##########
@@ -68,6 +72,15 @@ public class AirflowConfig extends ClientConfiguration {
@Value("${schedule.engine.airflow.baseUrl:http://localhost:8080/}")
private String baseUrl;
+ @PostConstruct
+ public void init() {
+ if (!StringUtil.isEmpty(inlongManagerUrl)) {
Review Comment:
```suggestion
if (!StringUtil.isNotBlank(inlongManagerUrl)) {
```
##########
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/config/AirflowConfig.java:
##########
@@ -68,6 +72,15 @@ public class AirflowConfig extends ClientConfiguration {
@Value("${schedule.engine.airflow.baseUrl:http://localhost:8080/}")
private String baseUrl;
+ @PostConstruct
+ public void init() {
+ if (!StringUtil.isEmpty(inlongManagerUrl)) {
+ String[] urlInfo = inlongManagerUrl.split(InlongConstants.COLON);
Review Comment:
Need to check the URL, otherwise NPE will occur when the `urlInfo.length` is
not equal 2.
--
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]