Package org.apache.iceberg.hive
Class HiveTableOperations
java.lang.Object
org.apache.iceberg.BaseMetastoreOperations
org.apache.iceberg.BaseMetastoreTableOperations
org.apache.iceberg.hive.HiveTableOperations
- All Implemented Interfaces:
org.apache.iceberg.TableOperations
public class HiveTableOperations
extends org.apache.iceberg.BaseMetastoreTableOperations
TODO we should be able to extract some more commonalities to BaseMetastoreTableOperations to
avoid code duplication between this class and Metacat Tables.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.iceberg.BaseMetastoreOperations
org.apache.iceberg.BaseMetastoreOperations.CommitStatus -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final longstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.iceberg.BaseMetastoreTableOperations
ICEBERG_TABLE_TYPE_VALUE, METADATA_HASH_PROP, METADATA_LOCATION_PROP, PREVIOUS_METADATA_LOCATION_PROP, TABLE_TYPE_PROP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHiveTableOperations(org.apache.hadoop.conf.Configuration conf, org.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient, org.apache.thrift.TException> metaClients, org.apache.iceberg.io.FileIO fileIO, org.apache.iceberg.encryption.KeyManagementClient keyManagementClient, String catalogName, String database, String table) -
Method Summary
Modifier and TypeMethodDescriptiondatabase()protected voiddoCommit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata) protected voidorg.apache.iceberg.encryption.EncryptionManagerhmsEnvContext(String metadataLocation) org.apache.iceberg.io.FileIOio()default org.apache.hadoop.hive.metastore.api.Tablelongorg.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,org.apache.thrift.TException> default org.apache.hadoop.hive.metastore.api.TablenewHmsTable(String hmsTableOwner) default voidpersistTable(org.apache.hadoop.hive.metastore.api.Table hmsTable, boolean updateHiveTable, String metadataLocation) table()protected Stringorg.apache.hadoop.hive.metastore.TableTypeorg.apache.iceberg.TableOperationstemp(org.apache.iceberg.TableMetadata uncommittedMetadata) Methods inherited from class org.apache.iceberg.BaseMetastoreTableOperations
checkCommitStatus, checkCommitStatusStrict, commit, current, currentMetadataLocation, currentVersion, disableRefresh, locationProvider, metadataFileLocation, metadataFileLocation, refresh, refreshFromMetadataLocation, refreshFromMetadataLocation, refreshFromMetadataLocation, refreshFromMetadataLocation, requestRefresh, writeNewMetadata, writeNewMetadataIfRequiredMethods inherited from class org.apache.iceberg.BaseMetastoreOperations
checkCommitStatus, checkCommitStatusStrictMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.TableOperations
newSnapshotId, requireStrictCleanup
-
Field Details
-
HIVE_TABLE_PROPERTY_MAX_SIZE
- See Also:
-
HIVE_TABLE_PROPERTY_MAX_SIZE_DEFAULT
static final long HIVE_TABLE_PROPERTY_MAX_SIZE_DEFAULT- See Also:
-
NO_LOCK_EXPECTED_KEY
- See Also:
-
NO_LOCK_EXPECTED_VALUE
- See Also:
-
ICEBERG_VIEW_TYPE_VALUE
- See Also:
-
-
Constructor Details
-
HiveTableOperations
protected HiveTableOperations(org.apache.hadoop.conf.Configuration conf, org.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient, org.apache.thrift.TException> metaClients, org.apache.iceberg.io.FileIO fileIO, org.apache.iceberg.encryption.KeyManagementClient keyManagementClient, String catalogName, String database, String table)
-
-
Method Details
-
tableName
- Specified by:
tableNamein classorg.apache.iceberg.BaseMetastoreTableOperations
-
io
public org.apache.iceberg.io.FileIO io()- Specified by:
ioin interfaceorg.apache.iceberg.TableOperations
-
encryption
public org.apache.iceberg.encryption.EncryptionManager encryption()- Specified by:
encryptionin interfaceorg.apache.iceberg.TableOperations
-
doRefresh
protected void doRefresh()- Overrides:
doRefreshin classorg.apache.iceberg.BaseMetastoreTableOperations
-
doCommit
protected void doCommit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata) - Overrides:
doCommitin classorg.apache.iceberg.BaseMetastoreTableOperations
-
maxHiveTablePropertySize
public long maxHiveTablePropertySize() -
database
-
table
-
tableType
public org.apache.hadoop.hive.metastore.TableType tableType() -
metaClients
public org.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,org.apache.thrift.TException> metaClients() -
temp
public org.apache.iceberg.TableOperations temp(org.apache.iceberg.TableMetadata uncommittedMetadata) - Specified by:
tempin interfaceorg.apache.iceberg.TableOperations- Overrides:
tempin classorg.apache.iceberg.BaseMetastoreTableOperations
-
loadHmsTable
default org.apache.hadoop.hive.metastore.api.Table loadHmsTable() throws org.apache.thrift.TException, InterruptedException- Throws:
org.apache.thrift.TExceptionInterruptedException
-
hmsEnvContext
-
persistTable
default void persistTable(org.apache.hadoop.hive.metastore.api.Table hmsTable, boolean updateHiveTable, String metadataLocation) throws org.apache.thrift.TException, InterruptedException - Throws:
org.apache.thrift.TExceptionInterruptedException
-
newHmsTable
-