public class JdbcUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CATALOG_KEY |
static String |
CATALOG_TABLE_NAME |
static String |
TABLE_DATABASE |
static String |
TABLE_NAME |
Constructor and Description |
---|
JdbcUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
acquire(JdbcClientPool connections,
String lockId,
long timeoutMillSeconds) |
static void |
createDistributedLockTable(JdbcClientPool connections,
Options options) |
static boolean |
databaseExists(JdbcClientPool connections,
String storeKey,
String databaseName) |
static int |
execute(java.util.function.Consumer<SQLException> sqlErrorHandler,
JdbcClientPool connections,
String sql,
String... args) |
static int |
execute(JdbcClientPool connections,
String sql,
String... args) |
static Properties |
extractJdbcConfiguration(Map<String,String> properties,
String prefix) |
static Map<String,String> |
getTable(JdbcClientPool connections,
String storeKey,
String databaseName,
String tableName)
Get paimon table metadata.
|
static boolean |
insertProperties(JdbcClientPool connections,
String storeKey,
String databaseName,
Map<String,String> properties) |
static void |
release(JdbcClientPool connections,
String lockId) |
static boolean |
tableExists(JdbcClientPool connections,
String storeKey,
String databaseName,
String tableName) |
static void |
updateTable(JdbcClientPool connections,
String storeKey,
Identifier fromTable,
Identifier toTable) |
public static final String CATALOG_TABLE_NAME
public static final String CATALOG_KEY
public static final String TABLE_DATABASE
public static final String TABLE_NAME
public static Properties extractJdbcConfiguration(Map<String,String> properties, String prefix)
public static Map<String,String> getTable(JdbcClientPool connections, String storeKey, String databaseName, String tableName) throws SQLException, InterruptedException
SQLException
InterruptedException
public static void updateTable(JdbcClientPool connections, String storeKey, Identifier fromTable, Identifier toTable)
public static boolean databaseExists(JdbcClientPool connections, String storeKey, String databaseName)
public static boolean tableExists(JdbcClientPool connections, String storeKey, String databaseName, String tableName)
public static int execute(JdbcClientPool connections, String sql, String... args)
public static int execute(java.util.function.Consumer<SQLException> sqlErrorHandler, JdbcClientPool connections, String sql, String... args)
public static boolean insertProperties(JdbcClientPool connections, String storeKey, String databaseName, Map<String,String> properties)
public static void createDistributedLockTable(JdbcClientPool connections, Options options) throws SQLException, InterruptedException
SQLException
InterruptedException
public static boolean acquire(JdbcClientPool connections, String lockId, long timeoutMillSeconds) throws SQLException, InterruptedException
SQLException
InterruptedException
public static void release(JdbcClientPool connections, String lockId) throws SQLException, InterruptedException
SQLException
InterruptedException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.