[
https://issues.apache.org/jira/browse/FLINK-25173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454061#comment-17454061
]
ZhuoYu Chen commented on FLINK-25173:
-------------------------------------
Hi [~lzljs3620320] I am very interested in this,and I want do some job for
flink,can I help to do that?
Thank you
> Introduce CatalogLock
> ---------------------
>
> Key: FLINK-25173
> URL: https://issues.apache.org/jira/browse/FLINK-25173
> Project: Flink
> Issue Type: Sub-task
> Components: Connectors / Hive, Table SQL / API
> Reporter: Jingsong Lee
> Priority: Major
> Fix For: 1.15.0
>
>
> Currently, only HiveCatalog can provide this catalog lock.
> {code:java}
> /**
> * 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();
> }
> } {code}
> And we need a interface to set lock to source&sink by catalog:
> {code:java}
> /**
> * 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);
> } {code}
> {{}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)