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, newReplaceTableTransaction
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createTable, createTable, createTable, dropTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExists
public Table createTable(TableIdentifier identifier, Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
Catalog
createTable
in interface Catalog
createTable
in class BaseMetastoreCatalog
identifier
- 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)
Catalog
loadTable
in interface Catalog
loadTable
in class BaseMetastoreCatalog
identifier
- a table identifierTable
implementation referred by tableIdentifier
public boolean dropTable(TableIdentifier identifier, 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 TableOperations newTableOps(TableIdentifier tableIdentifier)
newTableOps
in class BaseMetastoreCatalog
protected java.lang.String defaultWarehouseLocation(TableIdentifier tableIdentifier)
defaultWarehouseLocation
in class BaseMetastoreCatalog
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable