Skip to content

Commit

Permalink
[INLONG-11544][Manager] Optimize the configuration of the Manager sch…
Browse files Browse the repository at this point in the history
…edule module
  • Loading branch information
ZKpLo committed Nov 25, 2024
1 parent ace3362 commit 98629f6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ private void initConnection() throws Exception {
AirflowResponse<AirflowConnection> response = serverClient.sendRequest(
new AirflowConnectionGetter(airflowConfig.getConnectionId()));
if (!response.isSuccess()) {
String[] urlInfo = airflowConfig.getManagerUrl().split(":");
AirflowConnection newConn = new AirflowConnection(airflowConfig.getConnectionId(), "HTTP", "",
airflowConfig.getHost(), airflowConfig.getInlongUsername(), SUBMIT_OFFLINE_JOB_URI,
airflowConfig.getPort(), airflowConfig.getInlongPassword(), "");
urlInfo[0], airflowConfig.getInlongUsername(), SUBMIT_OFFLINE_JOB_URI,
Integer.parseInt(urlInfo[1]), airflowConfig.getInlongPassword(), "");
response = serverClient.sendRequest(new AirflowConnectionCreator(newConn));
LOGGER.info("AirflowConnection registration response: {}", response.toString());
if (!response.isSuccess()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@
@EqualsAndHashCode(callSuper = true)
public class AirflowConfig extends ClientConfiguration {

@Value("${schedule.engine.inlong.manager.host:127.0.0.1}")
private String host;

@Value("${server.port:8083}")
private int port;
@Value("${schedule.engine.inlong.manager.url:127.0.0.1:8083}")
private String managerUrl;

@Value("${default.admin.user:admin}")
private String inlongUsername;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public class DolphinScheduleEngine implements ScheduleEngine {

private static final Logger LOGGER = LoggerFactory.getLogger(DolphinScheduleEngine.class);

@Value("${schedule.engine.inlong.manager.host:127.0.0.1}")
private String host;
@Value("${schedule.engine.inlong.manager.host:127.0.0.1:8083}")
private String managerUrl;

@Value("${server.port:8083}")
private String host;
private int port;

@Value("${default.admin.user:admin}")
Expand All @@ -84,6 +84,9 @@ public class DolphinScheduleEngine implements ScheduleEngine {
@PostConstruct
public void init() {
this.projectBaseUrl = dolphinUrl + DS_PROJECT_URL;
String[] urlInfo = managerUrl.split(":");
this.host = urlInfo[0];
this.port = Integer.parseInt(urlInfo[1]);
}

public DolphinScheduleEngine(String host, int port, String username, String password, String dolphinUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ dirty.log.clean.interval.minutes=5
dirty.log.retention.minutes=10
dirty.log.db.table=inlong_iceberg::dirty_data_achive_iceberg

# Please confirm it is the actual address of manager
schedule.engine.inlong.manager.host=
# Inlong Manager URL accessible by the scheduler
schedule.engine.inlong.manager.url=127.0.0.1:8083

# DolphinScheduler related config
schedule.engine.dolphinscheduler.url=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ dirty.log.clean.interval.minutes=5
dirty.log.retention.minutes=10
dirty.log.db.table=inlong_iceberg::dirty_data_achive_iceberg

# Please confirm it is the actual address of manager
schedule.engine.inlong.manager.host=
# Inlong Manager URL accessible by the scheduler
schedule.engine.inlong.manager.url=127.0.0.1:8083

# DolphinScheduler related config
schedule.engine.dolphinscheduler.url=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ dirty.log.clean.interval.minutes=5
dirty.log.retention.minutes=10
dirty.log.db.table=inlong_iceberg::dirty_data_achive_iceberg

# Please confirm it is the actual address of manager
schedule.engine.inlong.manager.host=
# Inlong Manager URL accessible by the scheduler
schedule.engine.inlong.manager.url=127.0.0.1:8083

# DolphinScheduler related config
schedule.engine.dolphinscheduler.url=
Expand Down

0 comments on commit 98629f6

Please sign in to comment.