public abstract class BaseMetastoreCatalog extends java.lang.Object implements Catalog
Modifier and Type | Class and Description |
---|---|
protected class |
BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder |
Catalog.TableBuilder
Constructor and Description |
---|
BaseMetastoreCatalog() |
Modifier and Type | Method and Description |
---|---|
Catalog.TableBuilder |
buildTable(TableIdentifier identifier,
Schema schema)
Instantiate a builder to either create a table or start a create/replace transaction.
|
Table |
createTable(TableIdentifier identifier,
Schema schema,
PartitionSpec spec,
java.lang.String location,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a table.
|
protected abstract java.lang.String |
defaultWarehouseLocation(TableIdentifier tableIdentifier) |
protected static void |
dropTableData(FileIO io,
TableMetadata metadata)
Deprecated.
will be removed in 0.11.0; use CatalogUtil.dropTableData instead.
|
protected static java.lang.String |
fullTableName(java.lang.String catalogName,
TableIdentifier identifier) |
protected boolean |
isValidIdentifier(TableIdentifier tableIdentifier) |
Table |
loadTable(TableIdentifier identifier)
Load a table.
|
Transaction |
newCreateTableTransaction(TableIdentifier identifier,
Schema schema,
PartitionSpec spec,
java.lang.String location,
java.util.Map<java.lang.String,java.lang.String> properties)
Start a transaction to create a table.
|
Transaction |
newReplaceTableTransaction(TableIdentifier identifier,
Schema schema,
PartitionSpec spec,
java.lang.String location,
java.util.Map<java.lang.String,java.lang.String> properties,
boolean orCreate)
Start a transaction to replace a table.
|
protected abstract TableOperations |
newTableOps(TableIdentifier tableIdentifier) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createTable, createTable, createTable, dropTable, dropTable, listTables, name, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, renameTable, tableExists
public Table createTable(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
Catalog
createTable
in interface Catalog
identifier
- a table identifierschema
- a schemaspec
- a partition speclocation
- a location for the table; leave null if unspecifiedproperties
- a string map of table propertiespublic Transaction newCreateTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
Catalog
newCreateTableTransaction
in interface Catalog
identifier
- a table identifierschema
- a schemaspec
- a partition speclocation
- a location for the table; leave null if unspecifiedproperties
- a string map of table propertiesTransaction
to create the tablepublic Transaction newReplaceTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties, boolean orCreate)
Catalog
newReplaceTableTransaction
in interface Catalog
identifier
- a table identifierschema
- a schemaspec
- a partition speclocation
- a location for the table; leave null if unspecifiedproperties
- a string map of table propertiesorCreate
- whether to create the table if not existsTransaction
to replace the tablepublic Table loadTable(TableIdentifier identifier)
Catalog
public Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema schema)
Catalog
buildTable
in interface Catalog
identifier
- a table identifierschema
- a schemaprotected boolean isValidIdentifier(TableIdentifier tableIdentifier)
public java.lang.String toString()
toString
in class java.lang.Object
protected abstract TableOperations newTableOps(TableIdentifier tableIdentifier)
protected abstract java.lang.String defaultWarehouseLocation(TableIdentifier tableIdentifier)
@Deprecated protected static void dropTableData(FileIO io, TableMetadata metadata)
This should be called by dropTable implementations to clean up table files once the table has been dropped in the metastore.
io
- a FileIO to use for deletesmetadata
- the last valid TableMetadata instance for a dropped table.protected static java.lang.String fullTableName(java.lang.String catalogName, TableIdentifier identifier)