forked from apache/inlong
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INLONG-11400][Manager] Support Airflow schedule engine
- Loading branch information
ZKpLo
committed
Nov 9, 2024
1 parent
99dec05
commit 331ceb5
Showing
43 changed files
with
3,023 additions
and
3 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
...anager-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/Connection.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.pojo.schedule.airflow; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.annotations.ApiModel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* Full representation of the connection. | ||
*/ | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ApiModel(description = "Full representation of the connection.") | ||
public class Connection { | ||
|
||
public static final String SERIALIZED_NAME_CONNECTION_ID = "connection_id"; | ||
@SerializedName(SERIALIZED_NAME_CONNECTION_ID) | ||
private String connectionId; | ||
|
||
public static final String SERIALIZED_NAME_CONN_TYPE = "conn_type"; | ||
@SerializedName(SERIALIZED_NAME_CONN_TYPE) | ||
private String connType; | ||
|
||
public static final String SERIALIZED_DESCRIPTION = "description"; | ||
@SerializedName(SERIALIZED_DESCRIPTION) | ||
private String description; | ||
|
||
public static final String SERIALIZED_NAME_HOST = "host"; | ||
@SerializedName(SERIALIZED_NAME_HOST) | ||
private String host; | ||
|
||
public static final String SERIALIZED_NAME_LOGIN = "login"; | ||
@SerializedName(SERIALIZED_NAME_LOGIN) | ||
private String login; | ||
|
||
public static final String SERIALIZED_NAME_SCHEMA = "schema"; | ||
@SerializedName(SERIALIZED_NAME_SCHEMA) | ||
private String schema; | ||
|
||
public static final String SERIALIZED_NAME_PORT = "port"; | ||
@SerializedName(SERIALIZED_NAME_PORT) | ||
private Integer port; | ||
|
||
public static final String SERIALIZED_NAME_PASSWORD = "password"; | ||
@SerializedName(SERIALIZED_NAME_PASSWORD) | ||
private String password; | ||
|
||
public static final String SERIALIZED_NAME_EXTRA = "extra"; | ||
@SerializedName(SERIALIZED_NAME_EXTRA) | ||
private String extra; | ||
} |
40 changes: 40 additions & 0 deletions
40
...o/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/ConnectionCollection.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.pojo.schedule.airflow; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.annotations.ApiModel; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Collection of connections. | ||
*/ | ||
@Data | ||
@ApiModel(description = "Collection of connections.") | ||
public class ConnectionCollection { | ||
|
||
public static final String SERIALIZED_NAME_CONNECTIONS = "connections"; | ||
@SerializedName(SERIALIZED_NAME_CONNECTIONS) | ||
private List<Connection> connections; | ||
|
||
public static final String SERIALIZED_NAME_TOTAL_ENTRIES = "total_entries"; | ||
@SerializedName(SERIALIZED_NAME_TOTAL_ENTRIES) | ||
private Integer totalEntries; | ||
} |
66 changes: 66 additions & 0 deletions
66
...nager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/DAG.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.pojo.schedule.airflow; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.annotations.ApiModel; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
// todo 删除 | ||
@Data | ||
@ApiModel(description = "DAG") | ||
public class DAG { | ||
|
||
public static final String SERIALIZED_NAME_DAG_ID = "dag_id"; | ||
@SerializedName(SERIALIZED_NAME_DAG_ID) | ||
private String dagId; | ||
|
||
public static final String SERIALIZED_NAME_ROOT_DAG_ID = "root_dag_id"; | ||
@SerializedName(SERIALIZED_NAME_ROOT_DAG_ID) | ||
private String rootDagId; | ||
|
||
public static final String SERIALIZED_NAME_IS_PAUSED = "is_paused"; | ||
@SerializedName(SERIALIZED_NAME_IS_PAUSED) | ||
private Boolean isPaused; | ||
|
||
public static final String SERIALIZED_NAME_IS_ACTIVE = "is_active"; | ||
@SerializedName(SERIALIZED_NAME_IS_ACTIVE) | ||
private Boolean isActive; | ||
|
||
public static final String SERIALIZED_NAME_IS_SUBDAG = "is_subdag"; | ||
@SerializedName(SERIALIZED_NAME_IS_SUBDAG) | ||
private Boolean isSubdag; | ||
|
||
public static final String SERIALIZED_NAME_OWNERS = "owners"; | ||
@SerializedName(SERIALIZED_NAME_OWNERS) | ||
private List<String> owners = null; | ||
|
||
public static final String SERIALIZED_NAME_DESCRIPTION = "description"; | ||
@SerializedName(SERIALIZED_NAME_DESCRIPTION) | ||
private String description; | ||
|
||
public static final String SERIALIZED_NAME_SCHEDULE_INTERVAL = "schedule_interval"; | ||
@SerializedName(SERIALIZED_NAME_SCHEDULE_INTERVAL) | ||
private ScheduleInterval scheduleInterval; | ||
|
||
public static final String SERIALIZED_NAME_TAGS = "tags"; | ||
@SerializedName(SERIALIZED_NAME_TAGS) | ||
private List<Tag> tags; | ||
} |
41 changes: 41 additions & 0 deletions
41
...ger-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/DAGCollection.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.pojo.schedule.airflow; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.annotations.ApiModel; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
// todo 删除 | ||
/** | ||
* Collection of DAGs. | ||
*/ | ||
@Data | ||
@ApiModel(description = "Collection of DAGs.") | ||
public class DAGCollection { | ||
|
||
public static final String SERIALIZED_NAME_DAGS = "dags"; | ||
@SerializedName(SERIALIZED_NAME_DAGS) | ||
private List<DAG> dags = null; | ||
|
||
public static final String SERIALIZED_NAME_TOTAL_ENTRIES = "total_entries"; | ||
@SerializedName(SERIALIZED_NAME_TOTAL_ENTRIES) | ||
private Integer totalEntries; | ||
} |
62 changes: 62 additions & 0 deletions
62
...er/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/DAGRun.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.pojo.schedule.airflow; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* DAGRun | ||
*/ | ||
public class DAGRun { | ||
|
||
@SerializedName("conf") | ||
private Object conf; | ||
@SerializedName("dag_id") | ||
private String dagId; | ||
@SerializedName("dag_run_id") | ||
private String dagRunId; | ||
@SerializedName("data_interval_end") | ||
private String dataIntervalEnd; | ||
@SerializedName("data_interval_start") | ||
private String dataIntervalStart; | ||
@SerializedName("end_date") | ||
private String endDate; | ||
@SerializedName("execution_date") | ||
private String executionDate; | ||
|
||
@SerializedName("external_trigger") | ||
private Boolean externalTrigger = true; | ||
|
||
@SerializedName("last_scheduling_decision") | ||
private String lastSchedulingDecision; | ||
|
||
@SerializedName("logical_date") | ||
private String logicalDate; | ||
|
||
@SerializedName("note") | ||
private String note; | ||
|
||
@SerializedName("run_type") | ||
private String runType; | ||
|
||
@SerializedName("start_date") | ||
private String startDate; | ||
|
||
@SerializedName("state") | ||
private String state; | ||
} |
48 changes: 48 additions & 0 deletions
48
...anager-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/DAGRunConf.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.pojo.schedule.airflow; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class DAGRunConf { | ||
|
||
@SerializedName("inlong_group_id") | ||
private String inlongGroupId; | ||
@SerializedName("start_time") | ||
private long startTime; | ||
@SerializedName("end_time") | ||
private long endTime; | ||
|
||
@SerializedName("cron_expr") | ||
private String cronExpr; | ||
@SerializedName("seconds_interval") | ||
private String secondsInterval; | ||
|
||
@SerializedName("connection_id") | ||
private String connectionId; | ||
@SerializedName("timezone") | ||
private String timezone; | ||
} |
48 changes: 48 additions & 0 deletions
48
...ger/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/schedule/airflow/Error.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.manager.pojo.schedule.airflow; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.annotations.ApiModel; | ||
import lombok.Data; | ||
|
||
import java.math.BigDecimal; | ||
|
||
@Data | ||
@ApiModel(description = "[RFC7807](https://tools.ietf.org/html/rfc7807) compliant response. ") | ||
public class Error { | ||
|
||
public static final String SERIALIZED_NAME_DETAIL = "detail"; | ||
@SerializedName(SERIALIZED_NAME_DETAIL) | ||
private String detail; | ||
public static final String SERIALIZED_NAME_INSTANCE = "instance"; | ||
@SerializedName(SERIALIZED_NAME_INSTANCE) | ||
private String instance; | ||
|
||
public static final String SERIALIZED_NAME_STATUS = "status"; | ||
@SerializedName(SERIALIZED_NAME_STATUS) | ||
private BigDecimal status; | ||
|
||
public static final String SERIALIZED_NAME_TITLE = "title"; | ||
@SerializedName(SERIALIZED_NAME_TITLE) | ||
private String title; | ||
|
||
public static final String SERIALIZED_NAME_TYPE = "type"; | ||
@SerializedName(SERIALIZED_NAME_TYPE) | ||
private String type; | ||
} |
Oops, something went wrong.