public interface Catalog
| Modifier and Type | Method and Description |
|---|---|
default Table |
createTable(TableIdentifier identifier,
Schema schema)
Create an unpartitioned table.
|
default Table |
createTable(TableIdentifier identifier,
Schema schema,
PartitionSpec spec)
Create a table.
|
default Table |
createTable(TableIdentifier identifier,
Schema schema,
PartitionSpec spec,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a table.
|
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.
|
default boolean |
dropTable(TableIdentifier identifier)
Drop a table and delete all data and metadata files.
|
boolean |
dropTable(TableIdentifier identifier,
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 identifier)
Load a table.
|
default Transaction |
newCreateTableTransaction(TableIdentifier identifier,
Schema schema)
Start a transaction to create a table.
|
default Transaction |
newCreateTableTransaction(TableIdentifier identifier,
Schema schema,
PartitionSpec spec)
Start a transaction to create a table.
|
default Transaction |
newCreateTableTransaction(TableIdentifier identifier,
Schema schema,
PartitionSpec spec,
java.util.Map<java.lang.String,java.lang.String> properties)
Start a transaction to create 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.
|
default Transaction |
newReplaceTableTransaction(TableIdentifier identifier,
Schema schema,
boolean orCreate)
Start a transaction to replace a table.
|
default Transaction |
newReplaceTableTransaction(TableIdentifier identifier,
Schema schema,
PartitionSpec spec,
boolean orCreate)
Start a transaction to replace a table.
|
default Transaction |
newReplaceTableTransaction(TableIdentifier identifier,
Schema schema,
PartitionSpec spec,
java.util.Map<java.lang.String,java.lang.String> properties,
boolean orCreate)
Start a transaction to replace 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.
|
void |
renameTable(TableIdentifier from,
TableIdentifier to)
Rename a table.
|
default boolean |
tableExists(TableIdentifier identifier)
Check whether table exists.
|
java.util.List<TableIdentifier> listTables(Namespace namespace)
namespace - a namespaceNotFoundException - if the namespace is not foundTable createTable(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
identifier - a table identifierschema - a schemaspec - a partition speclocation - a location for the table; leave null if unspecifiedproperties - a string map of table propertiesAlreadyExistsException - if the table already existsdefault Table createTable(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.util.Map<java.lang.String,java.lang.String> properties)
identifier - a table identifierschema - a schemaspec - a partition specproperties - a string map of table propertiesAlreadyExistsException - if the table already existsdefault Table createTable(TableIdentifier identifier, Schema schema, PartitionSpec spec)
identifier - a table identifierschema - a schemaspec - a partition specAlreadyExistsException - if the table already existsdefault Table createTable(TableIdentifier identifier, Schema schema)
identifier - a table identifierschema - a schemaAlreadyExistsException - if the table already existsTransaction newCreateTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
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 tableAlreadyExistsException - if the table already existsdefault Transaction newCreateTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.util.Map<java.lang.String,java.lang.String> properties)
identifier - a table identifierschema - a schemaspec - a partition specproperties - a string map of table propertiesTransaction to create the tableAlreadyExistsException - if the table already existsdefault Transaction newCreateTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec)
identifier - a table identifierschema - a schemaspec - a partition specTransaction to create the tableAlreadyExistsException - if the table already existsdefault Transaction newCreateTableTransaction(TableIdentifier identifier, Schema schema)
identifier - a table identifierschema - a schemaTransaction to create the tableAlreadyExistsException - if the table already existsTransaction newReplaceTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties, boolean orCreate)
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 tableNoSuchTableException - if the table doesn't exist and orCreate is falsedefault Transaction newReplaceTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.util.Map<java.lang.String,java.lang.String> properties, boolean orCreate)
identifier - a table identifierschema - a schemaspec - a partition specproperties - a string map of table propertiesorCreate - whether to create the table if not existsTransaction to replace the tableNoSuchTableException - if the table doesn't exist and orCreate is falsedefault Transaction newReplaceTableTransaction(TableIdentifier identifier, Schema schema, PartitionSpec spec, boolean orCreate)
identifier - a table identifierschema - a schemaspec - a partition specorCreate - whether to create the table if not existsTransaction to replace the tableNoSuchTableException - if the table doesn't exist and orCreate is falsedefault Transaction newReplaceTableTransaction(TableIdentifier identifier, Schema schema, boolean orCreate)
identifier - a table identifierschema - a schemaorCreate - whether to create the table if not existsTransaction to replace the tableNoSuchTableException - if the table doesn't exist and orCreate is falsedefault boolean tableExists(TableIdentifier identifier)
identifier - a table identifierdefault boolean dropTable(TableIdentifier identifier)
identifier - a table identifierboolean dropTable(TableIdentifier identifier, boolean purge)
If purge is set to true the implementation should delete all data and metadata files.
identifier - a table identifierpurge - if true, delete all data and metadata files in the tablevoid renameTable(TableIdentifier from, TableIdentifier to)
from - identifier of the table to renameto - new table nameNoSuchTableException - if the from table does not existAlreadyExistsException - if the to table already existsTable loadTable(TableIdentifier identifier)
identifier - a table identifierTable implementation referred by tableIdentifierNoSuchTableException - if the table does not exist