-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[INLONG-11400][Manager] Support Airflow schedule engine #11479
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aloyszhang
previously approved these changes
Nov 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dockerzhang
previously approved these changes
Nov 12, 2024
fuweng11
reviewed
Nov 12, 2024
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...r-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java
Outdated
Show resolved
Hide resolved
...r-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java
Outdated
Show resolved
Hide resolved
...r-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java
Outdated
Show resolved
Hide resolved
...r-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java
Outdated
Show resolved
Hide resolved
fuweng11
reviewed
Nov 12, 2024
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
fuweng11
reviewed
Nov 13, 2024
...r-schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowServerClient.java
Show resolved
Hide resolved
fuweng11
reviewed
Nov 13, 2024
...r-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java
Outdated
Show resolved
Hide resolved
fuweng11
reviewed
Nov 13, 2024
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
vernedeng
reviewed
Nov 13, 2024
...dule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngineTest.java
Show resolved
Hide resolved
vernedeng
reviewed
Nov 13, 2024
...r/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/Connection.java
Outdated
Show resolved
Hide resolved
vernedeng
reviewed
Nov 13, 2024
...pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/ConnectionCollection.java
Outdated
Show resolved
Hide resolved
vernedeng
reviewed
Nov 13, 2024
...anager-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/DAGCollection.java
Outdated
Show resolved
Hide resolved
Zkplo
force-pushed
the
INLONG-11400
branch
2 times, most recently
from
November 14, 2024 06:07
14ab207
to
8b242da
Compare
fuweng11
reviewed
Nov 14, 2024
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngine.java
Outdated
Show resolved
Hide resolved
...er-schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/api/BaseAirflowApi.java
Outdated
Show resolved
Hide resolved
fuweng11
reviewed
Nov 15, 2024
...ule/src/main/java/org/apache/inlong/manager/schedule/exception/AirflowScheduleException.java
Show resolved
Hide resolved
2 tasks
fuweng11
reviewed
Nov 18, 2024
...ager-schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/enums/HttpMethod.java
Outdated
Show resolved
Hide resolved
fuweng11
reviewed
Nov 18, 2024
inlong-manager/manager-schedule/src/test/resources/application.properties
Outdated
Show resolved
Hide resolved
dockerzhang
reviewed
Nov 18, 2024
inlong-manager/manager-web/src/main/resources/application-test.properties
Outdated
Show resolved
Hide resolved
inlong-manager/manager-web/src/main/resources/application-test.properties
Outdated
Show resolved
Hide resolved
fuweng11
previously approved these changes
Nov 19, 2024
aloyszhang
previously approved these changes
Nov 19, 2024
dockerzhang
previously approved these changes
Nov 20, 2024
aloyszhang
previously approved these changes
Nov 20, 2024
fuweng11
previously approved these changes
Nov 20, 2024
dockerzhang
dismissed stale reviews from fuweng11, aloyszhang, and themself
via
November 20, 2024 02:32
e42edb6
dockerzhang
previously approved these changes
Nov 20, 2024
aloyszhang
previously approved these changes
Nov 20, 2024
vernedeng
previously approved these changes
Nov 20, 2024
Zkplo
dismissed stale reviews from vernedeng, aloyszhang, and dockerzhang
via
November 20, 2024 04:40
c640bbf
dockerzhang
reviewed
Nov 20, 2024
inlong-manager/manager-web/src/main/resources/application-dev.properties
Show resolved
Hide resolved
aloyszhang
approved these changes
Nov 20, 2024
dockerzhang
approved these changes
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11400
Motivation
Modifications
Need to know about Airflow
dag_creator.py
dag_cleaner.py
System design:
AirflowApi
interface and theBaseAirflowApi
abstract class are designed, and subsequent expansion only needs to be done on this basis.AirflowServerClient
for the interface.AirflowAuthInterceptor
is used for unified authorization of the interface, andLoggingInterceptor
is used for logging.Results:
When we issue a scheduled task, Airflow's
dag_creator
will receive information from Inlong manager and create an offline task DAG based on the information.As shown in the figure below.Inlong Manager Log
Now, I will modify the execution interval of this task through the inlong dashboard.
You can see that the modification is successful, but the Last Run field of the Web UI will not be reflected immediately, but it can be seen in Run After.
Next, change the scheduling period of this offline task to a Cron expression.
From the figure below we can see that the modification has been successful.
The execution results of each scheduled task are as follows:
There are two ways to delete files. One is that
dag_cleaner
will regularly scan the files that meet the rules in the directory to determine whether their end time exceeds the current time. The second is that Inlong manager triggersdag_cleaner
through an interface with parameters, anddag_cleaner
will directly delete the Dag file. For the latter, Inlong manager will also delete the DAG loaded into the memory instance through another interface.Verifying this change
(Please pick either of the following options)
This change is a trivial rework/code cleanup without any test coverage.
This change is already covered by existing tests, such as:
(please describe tests)
This change added tests and can be verified as follows:
(example:)