Interface ThriftMetastoreClient

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
FailureAwareThriftMetastoreClient, ThriftHiveMetastoreClient

public interface ThriftMetastoreClient extends Closeable
  • Method Details

    • close

      void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getAllDatabases

      List<String> getAllDatabases() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getDatabase

      io.trino.hive.thrift.metastore.Database getDatabase(String databaseName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getAllTables

      List<String> getAllTables(String databaseName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getAllTables

      Optional<List<SchemaTableName>> getAllTables() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getAllViews

      List<String> getAllViews(String databaseName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getAllViews

      Optional<List<SchemaTableName>> getAllViews() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getTablesWithParameter

      List<String> getTablesWithParameter(String databaseName, String parameterKey, String parameterValue) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • createDatabase

      void createDatabase(io.trino.hive.thrift.metastore.Database database) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • dropDatabase

      void dropDatabase(String databaseName, boolean deleteData, boolean cascade) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • alterDatabase

      void alterDatabase(String databaseName, io.trino.hive.thrift.metastore.Database database) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • createTable

      void createTable(io.trino.hive.thrift.metastore.Table table) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • dropTable

      void dropTable(String databaseName, String name, boolean deleteData) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • alterTableWithEnvironmentContext

      void alterTableWithEnvironmentContext(String databaseName, String tableName, io.trino.hive.thrift.metastore.Table newTable, io.trino.hive.thrift.metastore.EnvironmentContext context) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getTable

      io.trino.hive.thrift.metastore.Table getTable(String databaseName, String tableName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getFields

      List<io.trino.hive.thrift.metastore.FieldSchema> getFields(String databaseName, String tableName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getTableColumnStatistics

      List<io.trino.hive.thrift.metastore.ColumnStatisticsObj> getTableColumnStatistics(String databaseName, String tableName, List<String> columnNames) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • setTableColumnStatistics

      void setTableColumnStatistics(String databaseName, String tableName, List<io.trino.hive.thrift.metastore.ColumnStatisticsObj> statistics) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • deleteTableColumnStatistics

      void deleteTableColumnStatistics(String databaseName, String tableName, String columnName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getPartitionColumnStatistics

      Map<String,List<io.trino.hive.thrift.metastore.ColumnStatisticsObj>> getPartitionColumnStatistics(String databaseName, String tableName, List<String> partitionNames, List<String> columnNames) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • setPartitionColumnStatistics

      void setPartitionColumnStatistics(String databaseName, String tableName, String partitionName, List<io.trino.hive.thrift.metastore.ColumnStatisticsObj> statistics) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • deletePartitionColumnStatistics

      void deletePartitionColumnStatistics(String databaseName, String tableName, String partitionName, String columnName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getPartitionNames

      List<String> getPartitionNames(String databaseName, String tableName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getPartitionNamesFiltered

      List<String> getPartitionNamesFiltered(String databaseName, String tableName, List<String> partitionValues) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • addPartitions

      int addPartitions(List<io.trino.hive.thrift.metastore.Partition> newPartitions) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • dropPartition

      boolean dropPartition(String databaseName, String tableName, List<String> partitionValues, boolean deleteData) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • alterPartition

      void alterPartition(String databaseName, String tableName, io.trino.hive.thrift.metastore.Partition partition) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getPartition

      io.trino.hive.thrift.metastore.Partition getPartition(String databaseName, String tableName, List<String> partitionValues) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getPartitionsByNames

      List<io.trino.hive.thrift.metastore.Partition> getPartitionsByNames(String databaseName, String tableName, List<String> partitionNames) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • listRoles

      List<io.trino.hive.thrift.metastore.Role> listRoles(String principalName, io.trino.hive.thrift.metastore.PrincipalType principalType) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • listPrivileges

      List<io.trino.hive.thrift.metastore.HiveObjectPrivilege> listPrivileges(String principalName, io.trino.hive.thrift.metastore.PrincipalType principalType, io.trino.hive.thrift.metastore.HiveObjectRef hiveObjectRef) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getRoleNames

      List<String> getRoleNames() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • createRole

      void createRole(String role, String grantor) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • dropRole

      void dropRole(String role) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • grantPrivileges

      boolean grantPrivileges(io.trino.hive.thrift.metastore.PrivilegeBag privilegeBag) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • revokePrivileges

      boolean revokePrivileges(io.trino.hive.thrift.metastore.PrivilegeBag privilegeBag, boolean revokeGrantOption) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • grantRole

      void grantRole(String role, String granteeName, io.trino.hive.thrift.metastore.PrincipalType granteeType, String grantorName, io.trino.hive.thrift.metastore.PrincipalType grantorType, boolean grantOption) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • revokeRole

      void revokeRole(String role, String granteeName, io.trino.hive.thrift.metastore.PrincipalType granteeType, boolean grantOption) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • listGrantedPrincipals

      List<io.trino.hive.thrift.metastore.RolePrincipalGrant> listGrantedPrincipals(String role) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • listRoleGrants

      List<io.trino.hive.thrift.metastore.RolePrincipalGrant> listRoleGrants(String name, io.trino.hive.thrift.metastore.PrincipalType principalType) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • setUGI

      void setUGI(String userName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • openTransaction

      long openTransaction(String user) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • commitTransaction

      void commitTransaction(long transactionId) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • abortTransaction

      default void abortTransaction(long transactionId) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • sendTransactionHeartbeat

      void sendTransactionHeartbeat(long transactionId) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • acquireLock

      io.trino.hive.thrift.metastore.LockResponse acquireLock(io.trino.hive.thrift.metastore.LockRequest lockRequest) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • checkLock

      io.trino.hive.thrift.metastore.LockResponse checkLock(long lockId) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • unlock

      void unlock(long lockId) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getValidWriteIds

      String getValidWriteIds(List<String> tableList, long currentTransactionId) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getConfigValue

      String getConfigValue(String name, String defaultValue) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • getDelegationToken

      String getDelegationToken(String userName) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • allocateTableWriteIds

      default List<io.trino.hive.thrift.metastore.TxnToWriteId> allocateTableWriteIds(String database, String tableName, List<Long> transactionIds) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • alterPartitions

      void alterPartitions(String dbName, String tableName, List<io.trino.hive.thrift.metastore.Partition> partitions, long writeId) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • addDynamicPartitions

      void addDynamicPartitions(String dbName, String tableName, List<String> partitionNames, long transactionId, long writeId, AcidOperation operation) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException
    • alterTransactionalTable

      void alterTransactionalTable(io.trino.hive.thrift.metastore.Table table, long transactionId, long writeId, io.trino.hive.thrift.metastore.EnvironmentContext context) throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException