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

    Fields
    Modifier and Type
    Field
    Description
    static 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_HASH_PROP, METADATA_LOCATION_PROP, PREVIOUS_METADATA_LOCATION_PROP, TABLE_TYPE_PROP
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
     
    protected void
    doCommit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata)
     
    protected void
     
    org.apache.iceberg.encryption.EncryptionManager
     
    default Map<String,String>
    hmsEnvContext(String metadataLocation)
     
    org.apache.iceberg.io.FileIO
    io()
     
    default org.apache.hadoop.hive.metastore.api.Table
     
    long
     
    org.apache.iceberg.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)
     
     
    protected String
     
    org.apache.hadoop.hive.metastore.TableType
     
    org.apache.iceberg.TableOperations
    temp(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, 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

    newSnapshotId, requireStrictCleanup
  • Field Details

  • 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

      protected String tableName()
      Specified by:
      tableName in class org.apache.iceberg.BaseMetastoreTableOperations
    • io

      public org.apache.iceberg.io.FileIO io()
      Specified by:
      io in interface org.apache.iceberg.TableOperations
    • encryption

      public org.apache.iceberg.encryption.EncryptionManager encryption()
      Specified by:
      encryption in interface org.apache.iceberg.TableOperations
    • doRefresh

      protected void doRefresh()
      Overrides:
      doRefresh in class org.apache.iceberg.BaseMetastoreTableOperations
    • doCommit

      protected void doCommit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata)
      Overrides:
      doCommit in class org.apache.iceberg.BaseMetastoreTableOperations
    • maxHiveTablePropertySize

      public long maxHiveTablePropertySize()
    • database

      public String database()
    • table

      public String 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:
      temp in interface org.apache.iceberg.TableOperations
      Overrides:
      temp in class org.apache.iceberg.BaseMetastoreTableOperations
    • loadHmsTable

      default org.apache.hadoop.hive.metastore.api.Table loadHmsTable() throws org.apache.thrift.TException, InterruptedException
      Throws:
      org.apache.thrift.TException
      InterruptedException
    • hmsEnvContext

      default Map<String,String> hmsEnvContext(String metadataLocation)
    • 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

      default org.apache.hadoop.hive.metastore.api.Table newHmsTable(String hmsTableOwner)