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 13, 2024
1 parent
99dec05
commit bdbd908
Showing
41 changed files
with
3,052 additions
and
3 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...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,68 @@ | ||
/* | ||
* 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 io.swagger.annotations.ApiModelProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ApiModel(description = "Full representation of the connection.") | ||
public class Connection { | ||
|
||
@SerializedName("connection_id") | ||
@ApiModelProperty("The connection ID.") | ||
private String connectionId; | ||
|
||
@SerializedName("conn_type") | ||
@ApiModelProperty("The connection type.") | ||
private String connType; | ||
|
||
@SerializedName("description") | ||
@ApiModelProperty("The description of the connection.") | ||
private String description; | ||
|
||
@SerializedName("host") | ||
@ApiModelProperty("Host of the connection.") | ||
private String host; | ||
|
||
@SerializedName("login") | ||
@ApiModelProperty("Login of the connection.") | ||
private String login; | ||
|
||
@SerializedName("schema") | ||
@ApiModelProperty("Schema of the connection.") | ||
private String schema; | ||
|
||
@SerializedName("port") | ||
@ApiModelProperty("Port of the connection.") | ||
private Integer port; | ||
|
||
@SerializedName("password") | ||
@ApiModelProperty("Password of the connection.") | ||
private String password; | ||
|
||
@SerializedName("extra") | ||
@ApiModelProperty("Additional information description of the connection.") | ||
private String extra; | ||
} |
38 changes: 38 additions & 0 deletions
38
...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,38 @@ | ||
/* | ||
* 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 io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@ApiModel(description = "Collection List of connections.") | ||
public class ConnectionCollection { | ||
|
||
@SerializedName("connections") | ||
@ApiModelProperty("Airflow connection list.") | ||
private List<Connection> connections; | ||
|
||
@SerializedName("total_entries") | ||
@ApiModelProperty("Number of Airflow Connections.") | ||
private Integer totalEntries; | ||
} |
48 changes: 48 additions & 0 deletions
48
...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,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 io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
@Data | ||
@ApiModel(description = "DAG Description Information.") | ||
public class DAG { | ||
|
||
@SerializedName("dag_id") | ||
@ApiModelProperty("The ID of the DAG.") | ||
private String dagId; | ||
|
||
@SerializedName("root_dag_id") | ||
@ApiModelProperty("If the DAG is SubDAG then it is the top level DAG identifier. Otherwise, null.") | ||
private String rootDagId; | ||
|
||
@SerializedName("is_paused") | ||
@ApiModelProperty("Whether the DAG is paused.") | ||
private Boolean isPaused; | ||
|
||
@SerializedName("is_active") | ||
@ApiModelProperty("Whether the DAG is currently seen by the scheduler(s).") | ||
private Boolean isActive; | ||
|
||
@SerializedName("description") | ||
@ApiModelProperty("User-provided DAG description, which can consist of several sentences or paragraphs that describe DAG contents.") | ||
private String description; | ||
} |
38 changes: 38 additions & 0 deletions
38
...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,38 @@ | ||
/* | ||
* 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 io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@ApiModel(description = "Collection of DAGs.") | ||
public class DAGCollection { | ||
|
||
@SerializedName("dags") | ||
@ApiModelProperty("List of DAGs.") | ||
private List<DAG> dags = null; | ||
|
||
@SerializedName("total_entries") | ||
@ApiModelProperty("The length of DAG list.") | ||
private Integer totalEntries; | ||
} |
48 changes: 48 additions & 0 deletions
48
...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,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 io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
@Data | ||
@ApiModel(description = "DAGRun Description Information.") | ||
public class DAGRun { | ||
|
||
@SerializedName("conf") | ||
@ApiModelProperty("JSON object describing additional configuration parameters.") | ||
private Object conf; | ||
|
||
@SerializedName("dag_id") | ||
@ApiModelProperty("Airflow DAG id.") | ||
private String dagId; | ||
|
||
@SerializedName("dag_run_id") | ||
@ApiModelProperty("Airflow DAGRun id (Nullable).") | ||
private String dagRunId; | ||
|
||
@SerializedName("end_date") | ||
@ApiModelProperty("The end time of this DAGRun.") | ||
private String endDate; | ||
|
||
@SerializedName("start_date") | ||
@ApiModelProperty("The start time of this DAGRun.") | ||
private String startDate; | ||
} |
66 changes: 66 additions & 0 deletions
66
...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,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 io.swagger.annotations.ApiModelProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ApiModel(description = "DAGRunConf Description Information.") | ||
public class DAGRunConf { | ||
|
||
@SerializedName("inlong_group_id") | ||
@ApiModelProperty("Specify the Inlong group ID") | ||
private String inlongGroupId; | ||
|
||
@SerializedName("start_time") | ||
@ApiModelProperty("The start time of DAG scheduling.") | ||
private long startTime; | ||
|
||
@SerializedName("end_time") | ||
@ApiModelProperty("The end time of DAG scheduling.") | ||
private long endTime; | ||
|
||
@SerializedName("boundary_type") | ||
@ApiModelProperty("The offline task boundary type.") | ||
private String boundaryType; | ||
|
||
@SerializedName("cron_expr") | ||
@ApiModelProperty("Cron expression.") | ||
private String cronExpr; | ||
|
||
@SerializedName("seconds_interval") | ||
@ApiModelProperty("Time interval (in seconds).") | ||
private String secondsInterval; | ||
|
||
@SerializedName("connection_id") | ||
@ApiModelProperty("Connection of Inlong Manager.") | ||
private String connectionId; | ||
|
||
@SerializedName("timezone") | ||
@ApiModelProperty("The timezone.") | ||
private String timezone; | ||
} |
50 changes: 50 additions & 0 deletions
50
...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,50 @@ | ||
/* | ||
* 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 io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
import java.math.BigDecimal; | ||
|
||
@Data | ||
@ApiModel(description = "[RFC7807](https://tools.ietf.org/html/rfc7807) compliant response. ") | ||
public class Error { | ||
|
||
@SerializedName("detail") | ||
@ApiModelProperty("Error Details.") | ||
private String detail; | ||
|
||
@SerializedName("instance") | ||
@ApiModelProperty("Error of the instance.") | ||
private String instance; | ||
|
||
@SerializedName("status") | ||
@ApiModelProperty("Error of the status.") | ||
private BigDecimal status; | ||
|
||
@SerializedName("title") | ||
@ApiModelProperty("Error of the title.") | ||
private String title; | ||
|
||
@SerializedName("type") | ||
@ApiModelProperty("Error of the type.") | ||
private String type; | ||
} |
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
Oops, something went wrong.