public class JdbcCatalog extends AbstractCatalog
Catalog.ColumnAlreadyExistException, Catalog.ColumnNotExistException, Catalog.DatabaseAlreadyExistException, Catalog.DatabaseNoPermissionException, Catalog.DatabaseNotEmptyException, Catalog.DatabaseNotExistException, Catalog.ProcessSystemDatabaseException, Catalog.TableAlreadyExistException, Catalog.TableNoPermissionException, Catalog.TableNotExistException, Catalog.ViewAlreadyExistException, Catalog.ViewNotExistException
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_PREFIX |
catalogOptions, fileIO, tableDefaultOptions
COMMENT_PROP, DB_LOCATION_PROP, DB_SUFFIX, DEFAULT_DATABASE, LAST_UPDATE_TIME_PROP, NUM_FILES_PROP, NUM_ROWS_PROP, OWNER_PROP, SYSTEM_BRANCH_PREFIX, SYSTEM_DATABASE_NAME, SYSTEM_TABLE_SPLITTER, TABLE_DEFAULT_OPTION_PREFIX, TOTAL_SIZE_PROP
Modifier | Constructor and Description |
---|---|
protected |
JdbcCatalog(FileIO fileIO,
String catalogKey,
Options options,
String warehouse) |
Modifier and Type | Method and Description |
---|---|
protected void |
alterDatabaseImpl(String name,
List<PropertyChange> changes) |
protected void |
alterTableImpl(Identifier identifier,
List<SchemaChange> changes) |
boolean |
caseSensitive()
Return a boolean that indicates whether this catalog is case-sensitive.
|
CatalogLoader |
catalogLoader()
Serializable loader to create catalog.
|
void |
close() |
protected void |
createDatabaseImpl(String name,
Map<String,String> properties) |
protected void |
createTableImpl(Identifier identifier,
Schema schema) |
Optional<CatalogLockFactory> |
defaultLockFactory() |
protected void |
dropDatabaseImpl(String name) |
protected void |
dropTableImpl(Identifier identifier,
List<Path> externalPaths) |
JdbcClientPool |
getConnections() |
protected Database |
getDatabaseImpl(String databaseName) |
List<String> |
listDatabases()
Get the names of all databases in this catalog.
|
protected List<String> |
listTablesImpl(String databaseName) |
protected TableSchema |
loadTableSchema(Identifier identifier) |
Optional<CatalogLockContext> |
lockContext() |
protected void |
renameTableImpl(Identifier fromTable,
Identifier toTable) |
<T> T |
runWithLock(Identifier identifier,
Callable<T> callable) |
String |
warehouse() |
allowCustomTablePath, alterDatabase, alterPartitions, alterTable, assertMainBranch, createDatabase, createFormatTable, createPartitions, createTable, dropDatabase, dropPartitions, dropTable, fileIO, fileIO, getDatabase, getTable, getTableLocation, listDatabasesInFileSystem, listDatabasesPaged, listPartitions, listPartitionsPaged, listTableDetailsPaged, listTableDetailsPagedImpl, listTables, listTablesInFileSystem, listTablesPaged, loadTableMetadata, lockEnabled, lockFactory, markDonePartitions, newDatabasePath, newDatabasePath, newTableLocation, options, renameTable, tableExistsInFileSystem, tableSchemaInFileSystem
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
alterTable, createDatabase, createView, dropView, getView, invalidateTable, listViewDetailsPaged, listViews, listViewsPaged, renameView, repairCatalog, repairDatabase, repairTable
public static final String PROPERTY_PREFIX
@VisibleForTesting public JdbcClientPool getConnections()
public String warehouse()
warehouse
in class AbstractCatalog
public CatalogLoader catalogLoader()
Catalog
public List<String> listDatabases()
Catalog
protected Database getDatabaseImpl(String databaseName) throws Catalog.DatabaseNotExistException
getDatabaseImpl
in class AbstractCatalog
Catalog.DatabaseNotExistException
protected void createDatabaseImpl(String name, Map<String,String> properties)
createDatabaseImpl
in class AbstractCatalog
protected void dropDatabaseImpl(String name)
dropDatabaseImpl
in class AbstractCatalog
protected void alterDatabaseImpl(String name, List<PropertyChange> changes)
alterDatabaseImpl
in class AbstractCatalog
protected List<String> listTablesImpl(String databaseName)
listTablesImpl
in class AbstractCatalog
protected void dropTableImpl(Identifier identifier, List<Path> externalPaths)
dropTableImpl
in class AbstractCatalog
protected void createTableImpl(Identifier identifier, Schema schema)
createTableImpl
in class AbstractCatalog
protected void renameTableImpl(Identifier fromTable, Identifier toTable)
renameTableImpl
in class AbstractCatalog
protected void alterTableImpl(Identifier identifier, List<SchemaChange> changes) throws Catalog.ColumnAlreadyExistException, Catalog.TableNotExistException, Catalog.ColumnNotExistException
alterTableImpl
in class AbstractCatalog
Catalog.ColumnAlreadyExistException
Catalog.TableNotExistException
Catalog.ColumnNotExistException
protected TableSchema loadTableSchema(Identifier identifier) throws Catalog.TableNotExistException
loadTableSchema
in class AbstractCatalog
Catalog.TableNotExistException
public boolean caseSensitive()
Catalog
public Optional<CatalogLockFactory> defaultLockFactory()
defaultLockFactory
in class AbstractCatalog
public Optional<CatalogLockContext> lockContext()
lockContext
in class AbstractCatalog
public <T> T runWithLock(Identifier identifier, Callable<T> callable) throws Exception
Exception
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.