Package org.apache.iceberg
Class CachingCatalog
- java.lang.Object
-
- org.apache.iceberg.CachingCatalog
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.catalog.Catalog
createTable, createTable, createTable, dropTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExists
-
-
-
-
Method Detail
-
listTables
public java.util.List<TableIdentifier> listTables(Namespace namespace)
Description copied from interface:Catalog
Return all the identifiers under this namespace.- Specified by:
listTables
in interfaceCatalog
- Parameters:
namespace
- a namespace- Returns:
- a list of identifiers for tables
-
loadTable
public Table loadTable(TableIdentifier ident)
Description copied from interface:Catalog
Load a table.
-
createTable
public Table createTable(TableIdentifier ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface:Catalog
Create a table.- Specified by:
createTable
in interfaceCatalog
- Parameters:
ident
- a table identifierschema
- a schemaspec
- a partition speclocation
- a location for the table; leave null if unspecifiedproperties
- a string map of table properties- Returns:
- a Table instance
-
newCreateTableTransaction
public Transaction newCreateTableTransaction(TableIdentifier ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface:Catalog
Start a transaction to create a table.- Specified by:
newCreateTableTransaction
in interfaceCatalog
- Parameters:
ident
- a table identifierschema
- a schemaspec
- a partition speclocation
- a location for the table; leave null if unspecifiedproperties
- a string map of table properties- Returns:
- a
Transaction
to create the table
-
newReplaceTableTransaction
public Transaction newReplaceTableTransaction(TableIdentifier ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties, boolean orCreate)
Description copied from interface:Catalog
Start a transaction to replace a table.- Specified by:
newReplaceTableTransaction
in interfaceCatalog
- Parameters:
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 exists- Returns:
- a
Transaction
to replace the table
-
dropTable
public boolean dropTable(TableIdentifier ident, boolean purge)
Description copied from interface:Catalog
Drop a table; optionally delete data and metadata files.If purge is set to true the implementation should delete all data and metadata files.
-
renameTable
public void renameTable(TableIdentifier from, TableIdentifier to)
Description copied from interface:Catalog
Rename a table.- Specified by:
renameTable
in interfaceCatalog
- Parameters:
from
- identifier of the table to renameto
- new table name
-
-