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:
TableOperations
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
BaseMetastoreOperations.CommitStatus
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final long
static final String
static final String
static final String
Fields inherited from class org.apache.iceberg.BaseMetastoreTableOperations
ICEBERG_TABLE_TYPE_VALUE, METADATA_LOCATION_PROP, PREVIOUS_METADATA_LOCATION_PROP, TABLE_TYPE_PROP
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
HiveTableOperations
(org.apache.hadoop.conf.Configuration conf, ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient, org.apache.thrift.TException> metaClients, FileIO fileIO, String catalogName, String database, String table) -
Method Summary
Modifier and TypeMethodDescriptiondatabase()
protected void
doCommit
(TableMetadata base, TableMetadata metadata) protected void
hmsEnvContext
(String metadataLocation) io()
Returns aFileIO
to read and write table data and metadata files.default org.apache.hadoop.hive.metastore.api.Table
long
ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,
org.apache.thrift.TException> default org.apache.hadoop.hive.metastore.api.Table
newHmsTable
(String hmsTableOwner) default void
persistTable
(org.apache.hadoop.hive.metastore.api.Table hmsTable, boolean updateHiveTable, String metadataLocation) table()
protected String
The full name of the table used for logging purposes only.org.apache.hadoop.hive.metastore.TableType
Methods inherited from class org.apache.iceberg.BaseMetastoreTableOperations
checkCommitStatus, checkCommitStatusStrict, commit, current, currentMetadataLocation, currentVersion, disableRefresh, locationProvider, metadataFileLocation, refresh, refreshFromMetadataLocation, refreshFromMetadataLocation, refreshFromMetadataLocation, refreshFromMetadataLocation, requestRefresh, temp, writeNewMetadata, writeNewMetadataIfRequired
Methods inherited from class org.apache.iceberg.BaseMetastoreOperations
checkCommitStatus, checkCommitStatusStrict
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.TableOperations
encryption, 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, ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient, org.apache.thrift.TException> metaClients, FileIO fileIO, String catalogName, String database, String table)
-
-
Method Details
-
tableName
Description copied from class:BaseMetastoreTableOperations
The full name of the table used for logging purposes only. For example for HiveTableOperations it is catalogName + "." + database + "." + table.- Specified by:
tableName
in classBaseMetastoreTableOperations
- Returns:
- The full name
-
io
Description copied from interface:TableOperations
Returns aFileIO
to read and write table data and metadata files.- Specified by:
io
in interfaceTableOperations
-
doRefresh
protected void doRefresh()- Overrides:
doRefresh
in classBaseMetastoreTableOperations
-
doCommit
- Overrides:
doCommit
in classBaseMetastoreTableOperations
-
maxHiveTablePropertySize
public long maxHiveTablePropertySize() -
database
-
table
-
tableType
public org.apache.hadoop.hive.metastore.TableType tableType() -
metaClients
public ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,org.apache.thrift.TException> metaClients() -
loadHmsTable
default org.apache.hadoop.hive.metastore.api.Table loadHmsTable() throws org.apache.thrift.TException, InterruptedException- Throws:
org.apache.thrift.TException
InterruptedException
-
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.TException
InterruptedException
-
newHmsTable
-