public class HiveCatalog extends BaseMetastoreCatalog implements java.io.Closeable
| Constructor and Description |
|---|
HiveCatalog(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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.
|
protected java.lang.String |
defaultWarehouseLocation(TableIdentifier tableIdentifier) |
boolean |
dropTable(TableIdentifier identifier,
boolean purge)
Drop a table; optionally delete data and metadata files.
|
protected void |
finalize() |
Table |
loadTable(TableIdentifier identifier)
Load a table.
|
TableOperations |
newTableOps(TableIdentifier tableIdentifier) |
void |
renameTable(TableIdentifier from,
TableIdentifier to)
Rename a table.
|
dropTableData, newCreateTableTransaction, newReplaceTableTransactionclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateTable, createTable, createTable, dropTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExistspublic Table createTable(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
CatalogcreateTable in interface CatalogcreateTable in class BaseMetastoreCatalogidentifier - a table identifierschema - a schemaspec - a partition speclocation - a location for the table; leave null if unspecifiedproperties - a string map of table propertiespublic Table loadTable(TableIdentifier identifier)
CatalogloadTable in interface CatalogloadTable in class BaseMetastoreCatalogidentifier - a table identifierTable implementation referred by tableIdentifierpublic boolean dropTable(TableIdentifier identifier, 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 TableOperations newTableOps(TableIdentifier tableIdentifier)
newTableOps in class BaseMetastoreCatalogprotected java.lang.String defaultWarehouseLocation(TableIdentifier tableIdentifier)
defaultWarehouseLocation in class BaseMetastoreCatalogpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable