From fd2e7981156f6a95056e6714d81e33bfb6e7716c Mon Sep 17 00:00:00 2001 From: sunxiaojian Date: Wed, 27 Mar 2024 23:46:20 +0800 Subject: [PATCH] Support common jdbc catalog lock for filesystem catalog --- docs/content/flink/sql-ddl.md | 100 ++++++++------- docs/content/spark/sql-ddl.md | 8 +- .../generated/catalog_configuration.html | 8 +- .../apache/paimon/options/CatalogOptions.java | 9 +- .../paimon/catalog/AbstractCatalog.java | 27 ++++ .../org/apache/paimon/catalog/Catalog.java | 5 + .../catalog/CatalogLockContextFactory.java | 29 +++++ .../paimon/catalog/FileSystemCatalog.java | 13 ++ .../catalog/FileSystemCatalogFactory.java | 6 + .../org/apache/paimon/jdbc/JdbcCatalog.java | 2 +- .../paimon/jdbc/JdbcCatalogLockContext.java | 116 ++++++++++++++++-- .../jdbc/JdbcCatalogLockContextFactory.java | 37 ++++++ .../org/apache/paimon/jdbc/JdbcUtils.java | 13 ++ .../org.apache.paimon.factories.Factory | 1 + .../paimon/catalog/FileSystemCatalogTest.java | 72 +++++++++++ .../paimon/flink/FileSystemCatalogITCase.java | 18 ++- .../org.apache.paimon.factories.Factory | 6 +- .../org/apache/paimon/hive/HiveCatalog.java | 15 ++- .../paimon/hive/HiveCatalogLockContext.java | 10 ++ .../hive/HiveCatalogLockContextFactory.java | 36 ++++++ .../org.apache.paimon.factories.Factory | 1 + 21 files changed, 466 insertions(+), 66 deletions(-) create mode 100644 paimon-core/src/main/java/org/apache/paimon/catalog/CatalogLockContextFactory.java create mode 100644 paimon-core/src/main/java/org/apache/paimon/jdbc/JdbcCatalogLockContextFactory.java create mode 100644 paimon-core/src/test/java/org/apache/paimon/catalog/FileSystemCatalogTest.java create mode 100644 paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalogLockContextFactory.java diff --git a/docs/content/flink/sql-ddl.md b/docs/content/flink/sql-ddl.md index 3e6af04a8ea5..84f374d5526c 100644 --- a/docs/content/flink/sql-ddl.md +++ b/docs/content/flink/sql-ddl.md @@ -3,7 +3,7 @@ title: "SQL DDL" weight: 2 type: docs aliases: -- /flink/sql-ddl.html + - /flink/sql-ddl.html ---