From 20f906283aa10b5266c7fb660f0e0779862d537a Mon Sep 17 00:00:00 2001 From: Jia Fan Date: Fri, 13 Oct 2023 19:29:59 +0800 Subject: [PATCH 1/2] [Improve] Mark `SeaTunnelPluginLifeCycle` as deprecated --- .../seatunnel/api/common/SeaTunnelPluginLifeCycle.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/SeaTunnelPluginLifeCycle.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/SeaTunnelPluginLifeCycle.java index 731307f2025..a36ecfb6242 100644 --- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/SeaTunnelPluginLifeCycle.java +++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/SeaTunnelPluginLifeCycle.java @@ -22,7 +22,11 @@ /** * This interface is the life cycle of a plugin, after a plugin created, will execute prepare method * to do some initialize operation. + * + * @deprecated SeaTunnel will not invoke prepare when init plugin, instead by {@link + * org.apache.seatunnel.api.table.factory.Factory} */ +@Deprecated public interface SeaTunnelPluginLifeCycle { /** @@ -31,6 +35,9 @@ public interface SeaTunnelPluginLifeCycle { * @param pluginConfig plugin config. * @throws PrepareFailException if plugin prepare failed, the {@link PrepareFailException} will * throw. + * @deprecated SeaTunnel will not invoke prepare when init plugin, instead by {@link + * org.apache.seatunnel.api.table.factory.Factory} */ + @Deprecated void prepare(Config pluginConfig) throws PrepareFailException; } From 7723f424bf9c436ea60e84de0a8fe22cdbb81b6a Mon Sep 17 00:00:00 2001 From: Jia Fan Date: Mon, 16 Oct 2023 12:47:34 +0800 Subject: [PATCH 2/2] update --- .../org/apache/seatunnel/api/sink/SeaTunnelSink.java | 2 ++ .../seatunnel/api/transform/SeaTunnelTransform.java | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java index 0ed1b1bf7fb..352c2e9d48e 100644 --- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java +++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SeaTunnelSink.java @@ -53,8 +53,10 @@ public interface SeaTunnelSink * Set the row type info of sink row data. This method will be automatically called by * translation. * + * @deprecated instead by {@link org.apache.seatunnel.api.table.factory.Factory} * @param seaTunnelRowType The row type info of sink. */ + @Deprecated void setTypeInfo(SeaTunnelRowType seaTunnelRowType); /** diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/transform/SeaTunnelTransform.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/transform/SeaTunnelTransform.java index 54b0e390a7b..741670e9e63 100644 --- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/transform/SeaTunnelTransform.java +++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/transform/SeaTunnelTransform.java @@ -37,22 +37,22 @@ default void open() {} /** * Set the data type info of input data. * + * @deprecated instead by {@link org.apache.seatunnel.api.table.factory.Factory} * @param inputDataType The data type info of upstream input. */ + @Deprecated void setTypeInfo(SeaTunnelDataType inputDataType); /** * Get the data type of the records produced by this transform. * + * @deprecated Please use {@link #getProducedCatalogTable} * @return Produced data type. */ + @Deprecated SeaTunnelDataType getProducedType(); - /** - * Get the catalog table output by this transform - * - * @return - */ + /** Get the catalog table output by this transform */ CatalogTable getProducedCatalogTable(); /**