Skip to content

Commit

Permalink
[FLINK-32656][table] Deprecate ManagedTable related APIs
Browse files Browse the repository at this point in the history
This closes apache#23065.
  • Loading branch information
LadyForest authored Aug 4, 2023
1 parent 50622df commit 34729c8
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> T runWithLock(String database, String table, Callable<T> 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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit 34729c8

Please sign in to comment.