Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Currently, only HiveCatalog can provide this catalog lock.
/** * An interface that allows source and sink to use global lock to some transaction-related things. */ @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}. */ interface Factory extends Serializable { CatalogLock create(); } }
And we need a interface to set lock to source&sink by catalog:
/** * Source and sink implement this interface if they require {@link CatalogLock}. This is marked as * internal. If we need lock to be more general, we can put lock factory into {@link * DynamicTableFactory.Context}. */ @Internal public interface RequireCatalogLock { void setLockFactory(CatalogLock.Factory lockFactory); }
{{}}
Attachments
Issue Links
- links to