Catalog.TableBuilder| 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 ident,
Schema schema,
PartitionSpec spec,
java.lang.String location,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a table.
|
boolean |
dropTable(TableIdentifier ident,
boolean purge)
Drop a table; optionally delete data and metadata files.
|
java.util.List<TableIdentifier> |
listTables(Namespace namespace)
Return all the identifiers under this namespace.
|
Table |
loadTable(TableIdentifier ident)
Load a table.
|
java.lang.String |
name()
Return the name for this catalog.
|
Transaction |
newCreateTableTransaction(TableIdentifier ident,
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 ident,
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.
|
void |
renameTable(TableIdentifier from,
TableIdentifier to)
Rename a table.
|
static Catalog |
wrap(Catalog catalog) |
static Catalog |
wrap(Catalog catalog,
boolean caseSensitive) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateTable, createTable, createTable, dropTable, initialize, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExistspublic java.lang.String name()
Catalogpublic java.util.List<TableIdentifier> listTables(Namespace namespace)
CataloglistTables in interface Catalognamespace - a namespacepublic Table loadTable(TableIdentifier ident)
Catalogpublic Table createTable(TableIdentifier ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
CatalogcreateTable in interface Catalogident - 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 ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
CatalognewCreateTableTransaction in interface Catalogident - 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 ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties, boolean orCreate)
CatalognewReplaceTableTransaction in interface Catalogident - 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 boolean dropTable(TableIdentifier ident, boolean purge)
CatalogIf purge is set to true the implementation should delete all data and metadata files.
public void renameTable(TableIdentifier from, TableIdentifier to)
CatalogrenameTable in interface Catalogfrom - identifier of the table to renameto - new table namepublic Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema schema)
CatalogbuildTable in interface Catalogidentifier - a table identifierschema - a schema