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 TablecreateTable(TableIdentifier ident, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)Create a table.booleandropTable(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.TableloadTable(TableIdentifier ident)Load a table.TransactionnewCreateTableTransaction(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.TransactionnewReplaceTableTransaction(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.voidrenameTable(TableIdentifier from, TableIdentifier to)Rename a table.static Catalogwrap(Catalog catalog)static Catalogwrap(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:CatalogReturn all the identifiers under this namespace.- Specified by:
listTablesin interfaceCatalog- Parameters:
namespace- a namespace- Returns:
- a list of identifiers for tables
-
loadTable
public Table loadTable(TableIdentifier ident)
Description copied from interface:CatalogLoad 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:CatalogCreate a table.- Specified by:
createTablein 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:CatalogStart a transaction to create a table.- Specified by:
newCreateTableTransactionin 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
Transactionto 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:CatalogStart a transaction to replace a table.- Specified by:
newReplaceTableTransactionin 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
Transactionto replace the table
-
dropTable
public boolean dropTable(TableIdentifier ident, boolean purge)
Description copied from interface:CatalogDrop 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:CatalogRename a table.- Specified by:
renameTablein interfaceCatalog- Parameters:
from- identifier of the table to renameto- new table name
-
-