diff --git a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogLock.java b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogLock.java index a9429f3ab6169..52f7a16b115bd 100644 --- a/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogLock.java +++ b/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogLock.java @@ -46,7 +46,12 @@ import static org.apache.flink.table.catalog.hive.HiveConfOptions.LOCK_ACQUIRE_TIMEOUT; import static org.apache.flink.table.catalog.hive.HiveConfOptions.LOCK_CHECK_MAX_SLEEP; -/** Hive {@link CatalogLock}. */ +/** + * Hive {@link CatalogLock}. + * + * @deprecated This class will be removed soon. Please see FLIP-346 for more details. + */ +@Deprecated public class HiveCatalogLock implements CatalogLock { private final HiveMetastoreClientWrapper client; @@ -123,6 +128,7 @@ public static CatalogLock.Factory createFactory(HiveConf hiveConf) { return new HiveCatalogLockFactory(hiveConf); } + @Deprecated private static class HiveCatalogLockFactory implements CatalogLock.Factory { private static final long serialVersionUID = 1L; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableDescriptor.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableDescriptor.java index d8f295d8790d5..f2d17d07da3dd 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableDescriptor.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableDescriptor.java @@ -81,7 +81,12 @@ public static Builder forConnector(String connector) { return descriptorBuilder; } - /** Creates a new {@link Builder} for a managed table. */ + /** + * Creates a new {@link Builder} for a managed table. + * + * @deprecated This method will be removed soon. Please see FLIP-346 for more details. + */ + @Deprecated public static Builder forManaged() { return new Builder(); } diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/ManagedTableListener.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/ManagedTableListener.java index 80f7c95bbd324..fcacb1f1e4590 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/ManagedTableListener.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/ManagedTableListener.java @@ -37,7 +37,12 @@ import static org.apache.flink.table.factories.ManagedTableFactory.discoverManagedTableFactory; -/** The listener for managed table operations. */ +/** + * The listener for managed table operations. + * + * @deprecated This interface will be removed soon. Please see FLIP-346 for more details. + */ +@Deprecated @Internal public class ManagedTableListener { diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java index 8b137d2e51d41..ccacb948b3be3 100644 --- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java +++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java @@ -367,7 +367,12 @@ default void alterTable( alterTable(tablePath, newTable, ignoreIfNotExists); } - /** If true, tables which do not specify a connector will be translated to managed tables. */ + /** + * If true, tables which do not specify a connector will be translated to managed tables. + * + * @deprecated This method will be removed soon. Please see FLIP-346 for more details. + */ + @Deprecated default boolean supportsManagedTable() { return false; } diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/CatalogLock.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/CatalogLock.java index f64e2313deeea..d43e94dc6f551 100644 --- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/CatalogLock.java +++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/CatalogLock.java @@ -26,14 +26,22 @@ /** * An interface that allows source and sink to use global lock to some transaction-related things. + * + * @deprecated This interface will be removed soon. Please see FLIP-346 for more details. */ +@Deprecated @Internal public interface CatalogLock extends Closeable { /** Run with catalog lock. The caller should tell catalog the database and table name. */ T runWithLock(String database, String table, Callable callable) throws Exception; - /** Factory to create {@link CatalogLock}. */ + /** + * Factory to create {@link CatalogLock}. + * + * @deprecated This interface will be removed soon. Please see FLIP-346 for more details. + */ + @Deprecated interface Factory extends Serializable { CatalogLock create(); } diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/RequireCatalogLock.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/RequireCatalogLock.java index 3f1289c5b5cbf..bc0ee1f6f400d 100644 --- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/RequireCatalogLock.java +++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/RequireCatalogLock.java @@ -21,7 +21,12 @@ import org.apache.flink.annotation.Internal; import org.apache.flink.table.catalog.CatalogLock; -/** Source and sink implement this interface if they require {@link CatalogLock}. */ +/** + * Source and sink implement this interface if they require {@link CatalogLock}. + * + * @deprecated This interface will be removed soon. Please see FLIP-346 for more details. + */ +@Deprecated @Internal public interface RequireCatalogLock { diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/ManagedTableFactory.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/ManagedTableFactory.java index d38e293ed6556..3a8cd327cb364 100644 --- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/ManagedTableFactory.java +++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/ManagedTableFactory.java @@ -26,7 +26,10 @@ /** * Base interface for configuring a managed dynamic table connector. The managed table factory is * used when there is no {@link FactoryUtil#CONNECTOR} option. + * + * @deprecated This interface will be removed soon. Please see FLIP-346 for more details. */ +@Deprecated @Internal public interface ManagedTableFactory extends DynamicTableFactory {