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, wait
createTable, createTable, createTable, dropTable, initialize, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExists
public java.lang.String name()
Catalog
public java.util.List<TableIdentifier> listTables(Namespace namespace)
Catalog
listTables
in interface Catalog
namespace
- a namespacepublic Table loadTable(TableIdentifier ident)
Catalog
public Table createTable(TableIdentifier ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
Catalog
createTable
in interface Catalog
ident
- 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)
Catalog
newCreateTableTransaction
in interface Catalog
ident
- 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)
Catalog
newReplaceTableTransaction
in interface Catalog
ident
- 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)
Catalog
If purge is set to true the implementation should delete all data and metadata files.
public void renameTable(TableIdentifier from, TableIdentifier to)
Catalog
renameTable
in interface Catalog
from
- identifier of the table to renameto
- new table namepublic Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema schema)
Catalog
buildTable
in interface Catalog
identifier
- a table identifierschema
- a schema