@InterfaceAudience.Public
@InterfaceStability.Stable
public interface HiveMetaHook
Implementations can use MetaStoreUtils.isExternalTable(org.apache.hadoop.hive.metastore.api.Table) to
distinguish external tables from managed tables.
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
allowedAlterTypes |
static String |
ALTER_TABLE_OPERATION_TYPE |
| Modifier and Type | Method and Description |
|---|---|
void |
commitCreateTable(org.apache.hadoop.hive.metastore.api.Table table)
Called after successfully adding a new table definition to the metastore
during CREATE TABLE.
|
void |
commitDropTable(org.apache.hadoop.hive.metastore.api.Table table,
boolean deleteData)
Called after successfully removing a table definition from the metastore
during DROP TABLE.
|
default void |
preAlterTable(org.apache.hadoop.hive.metastore.api.Table table,
org.apache.hadoop.hive.metastore.api.EnvironmentContext context)
Called before a table is altered in the metastore
during ALTER TABLE.
|
void |
preCreateTable(org.apache.hadoop.hive.metastore.api.Table table)
Called before a new table definition is added to the metastore
during CREATE TABLE.
|
void |
preDropTable(org.apache.hadoop.hive.metastore.api.Table table)
Called before a table definition is removed from the metastore
during DROP TABLE.
|
void |
rollbackCreateTable(org.apache.hadoop.hive.metastore.api.Table table)
Called after failure adding a new table definition to the metastore
during CREATE TABLE.
|
void |
rollbackDropTable(org.apache.hadoop.hive.metastore.api.Table table)
Called after failure removing a table definition from the metastore
during DROP TABLE.
|
static final String ALTER_TABLE_OPERATION_TYPE
void preCreateTable(org.apache.hadoop.hive.metastore.api.Table table)
throws org.apache.hadoop.hive.metastore.api.MetaException
table - new table definitionorg.apache.hadoop.hive.metastore.api.MetaExceptionvoid rollbackCreateTable(org.apache.hadoop.hive.metastore.api.Table table)
throws org.apache.hadoop.hive.metastore.api.MetaException
table - new table definitionorg.apache.hadoop.hive.metastore.api.MetaExceptionvoid commitCreateTable(org.apache.hadoop.hive.metastore.api.Table table)
throws org.apache.hadoop.hive.metastore.api.MetaException
table - new table definitionorg.apache.hadoop.hive.metastore.api.MetaExceptionvoid preDropTable(org.apache.hadoop.hive.metastore.api.Table table)
throws org.apache.hadoop.hive.metastore.api.MetaException
table - table definitionorg.apache.hadoop.hive.metastore.api.MetaExceptionvoid rollbackDropTable(org.apache.hadoop.hive.metastore.api.Table table)
throws org.apache.hadoop.hive.metastore.api.MetaException
table - table definitionorg.apache.hadoop.hive.metastore.api.MetaExceptionvoid commitDropTable(org.apache.hadoop.hive.metastore.api.Table table,
boolean deleteData)
throws org.apache.hadoop.hive.metastore.api.MetaException
table - table definitiondeleteData - whether to delete data as well; this should typically
be ignored in the case of an external tableorg.apache.hadoop.hive.metastore.api.MetaExceptiondefault void preAlterTable(org.apache.hadoop.hive.metastore.api.Table table,
org.apache.hadoop.hive.metastore.api.EnvironmentContext context)
throws org.apache.hadoop.hive.metastore.api.MetaException
table - new table definitionorg.apache.hadoop.hive.metastore.api.MetaExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.