Package com.dremio.nessie.hms
Class NessieStoreImpl
- java.lang.Object
-
- com.dremio.nessie.hms.NessieStoreImpl
-
- All Implemented Interfaces:
NessieStore,TransactionHandler,org.apache.hadoop.conf.Configurable
public class NessieStoreImpl extends Object implements NessieStore
A rawstore implementation that is backed by the Nessie REST API.
-
-
Field Summary
-
Fields inherited from interface com.dremio.nessie.hms.NessieStore
NESSIE_WHITELIST_DBS_OPTION
-
-
Constructor Summary
Constructors Constructor Description NessieStoreImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddPartition(org.apache.hadoop.hive.metastore.api.Partition part)booleanaddPartitions(String dbName, String tblName, List<org.apache.hadoop.hive.metastore.api.Partition> parts)booleanaddPartitions(String dbName, String tblName, org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy partitionSpec, boolean ifNotExists)booleanalterDatabase(String dbname, org.apache.hadoop.hive.metastore.api.Database db)voidalterPartition(String dbName, String tblName, List<String> partVals, org.apache.hadoop.hive.metastore.api.Partition newPart)voidalterPartitions(String dbName, String tblName, List<List<String>> partValsList, List<org.apache.hadoop.hive.metastore.api.Partition> newParts)voidalterTable(String dbname, String name, org.apache.hadoop.hive.metastore.api.Table newTable)booleancommitTransaction()voidcreateDatabase(org.apache.hadoop.hive.metastore.api.Database db)voidcreateTable(org.apache.hadoop.hive.metastore.api.Table tbl)booleandoesPartitionExist(String dbName, String tableName, List<String> partitionValues)booleandropDatabase(String dbname)booleandropPartition(String dbName, String tableName, List<String> partVals)voiddropPartitions(String dbName, String tableName, List<String> partNames)booleandropTable(String dbName, String tableName)List<String>getAllDatabases()List<String>getAllTables(String dbName)org.apache.hadoop.conf.ConfigurationgetConf()org.apache.hadoop.hive.metastore.api.DatabasegetDatabase(String name)intgetDatabaseCount()List<String>getDatabases(String pattern)StringgetMetaStoreSchemaVersion()intgetNumPartitionsByExpr(String dbName, String tblName, byte[] expr)intgetNumPartitionsByFilter(String dbName, String tblName, String filter)org.apache.hadoop.hive.metastore.api.PartitiongetPartition(String dbName, String tableName, List<String> partitionValues)Map<String,List<String>>getPartitionColsWithStats(String dbName, String tableName)intgetPartitionCount()List<org.apache.hadoop.hive.metastore.api.Partition>getPartitions(String dbName, String tableName, int max)booleangetPartitionsByExpr(String dbName, String tblName, byte[] expr, String defaultPartitionName, short maxParts, List<org.apache.hadoop.hive.metastore.api.Partition> result)List<org.apache.hadoop.hive.metastore.api.Partition>getPartitionsByFilter(String dbName, String tblName, String filter, short maxParts)List<org.apache.hadoop.hive.metastore.api.Partition>getPartitionsByNames(String dbName, String tblName, List<String> partNames)List<org.apache.hadoop.hive.metastore.api.Partition>getPartitionsWithAuth(String dbName, String tblName, short maxParts, String userName, List<String> groupNames)org.apache.hadoop.hive.metastore.api.PartitiongetPartitionWithAuth(String dbName, String tblName, List<String> partVals, String userName, List<String> groupNames)org.apache.hadoop.hive.metastore.api.TablegetTable(String dbName, String tableName)intgetTableCount()List<org.apache.hadoop.hive.metastore.api.TableMeta>getTableMeta(String dbName, String tableNames, List<String> tableTypes)List<org.apache.hadoop.hive.metastore.api.Table>getTableObjectsByName(String dbName, List<String> tableNames)List<String>getTables(String dbName, String pattern)List<String>getTables(String dbName, String pattern, org.apache.hadoop.hive.metastore.TableType tableType)booleanisActiveTransaction()List<String>listPartitionNames(String dbName, String tblName, short maxParts)List<String>listPartitionNamesByFilter(String dbName, String tblName, String filter, short maxParts)List<org.apache.hadoop.hive.metastore.api.Partition>listPartitionsPsWithAuth(String dbName, String tblName, List<String> partVals, short maxParts, String userName, List<String> groupNames)org.apache.hadoop.hive.metastore.api.PartitionValuesResponselistPartitionValues(String dbName, String tblName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols, boolean applyDistinct, String filter, boolean ascending, List<org.apache.hadoop.hive.metastore.api.FieldSchema> order, long maxParts)List<String>listTableNamesByFilter(String dbName, String filter, short maxTables)booleanopenTransaction()voidrollbackTransaction()voidsetConf(org.apache.hadoop.conf.Configuration conf)voidshutdown()
-
-
-
Method Detail
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable
-
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceTransactionHandler
-
openTransaction
public boolean openTransaction()
- Specified by:
openTransactionin interfaceTransactionHandler
-
commitTransaction
public boolean commitTransaction()
- Specified by:
commitTransactionin interfaceTransactionHandler
-
isActiveTransaction
public boolean isActiveTransaction()
- Specified by:
isActiveTransactionin interfaceTransactionHandler
-
rollbackTransaction
public void rollbackTransaction()
- Specified by:
rollbackTransactionin interfaceTransactionHandler
-
createDatabase
public void createDatabase(org.apache.hadoop.hive.metastore.api.Database db) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException- Specified by:
createDatabasein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
getDatabase
public org.apache.hadoop.hive.metastore.api.Database getDatabase(String name) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getDatabasein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
dropDatabase
public boolean dropDatabase(String dbname) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
dropDatabasein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
alterDatabase
public boolean alterDatabase(String dbname, org.apache.hadoop.hive.metastore.api.Database db) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
alterDatabasein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
getDatabases
public List<String> getDatabases(String pattern) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getDatabasesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getAllDatabases
public List<String> getAllDatabases() throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getAllDatabasesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
createTable
public void createTable(org.apache.hadoop.hive.metastore.api.Table tbl) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException- Specified by:
createTablein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
dropTable
public boolean dropTable(String dbName, String tableName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.InvalidInputException
- Specified by:
dropTablein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.InvalidInputException
-
getTable
public org.apache.hadoop.hive.metastore.api.Table getTable(String dbName, String tableName) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getTablein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
addPartition
public boolean addPartition(org.apache.hadoop.hive.metastore.api.Partition part) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException- Specified by:
addPartitionin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
addPartitions
public boolean addPartitions(String dbName, String tblName, List<org.apache.hadoop.hive.metastore.api.Partition> parts) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
addPartitionsin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
addPartitions
public boolean addPartitions(String dbName, String tblName, org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy partitionSpec, boolean ifNotExists) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
addPartitionsin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
getPartition
public org.apache.hadoop.hive.metastore.api.Partition getPartition(String dbName, String tableName, List<String> partitionValues) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getPartitionin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
getPartitionWithAuth
public org.apache.hadoop.hive.metastore.api.Partition getPartitionWithAuth(String dbName, String tblName, List<String> partVals, String userName, List<String> groupNames) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidObjectException
- Specified by:
getPartitionWithAuthin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.hadoop.hive.metastore.api.InvalidObjectException
-
getPartitionsWithAuth
public List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsWithAuth(String dbName, String tblName, short maxParts, String userName, List<String> groupNames) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidObjectException
- Specified by:
getPartitionsWithAuthin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.hadoop.hive.metastore.api.InvalidObjectException
-
doesPartitionExist
public boolean doesPartitionExist(String dbName, String tableName, List<String> partitionValues) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
doesPartitionExistin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
dropPartition
public boolean dropPartition(String dbName, String tableName, List<String> partVals) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.InvalidInputException
- Specified by:
dropPartitionin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.InvalidInputException
-
dropPartitions
public void dropPartitions(String dbName, String tableName, List<String> partNames) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
dropPartitionsin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
getPartitions
public List<org.apache.hadoop.hive.metastore.api.Partition> getPartitions(String dbName, String tableName, int max) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getPartitionsin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
alterTable
public void alterTable(String dbname, String name, org.apache.hadoop.hive.metastore.api.Table newTable) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
alterTablein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
getTables
public List<String> getTables(String dbName, String pattern) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getTablesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getTables
public List<String> getTables(String dbName, String pattern, org.apache.hadoop.hive.metastore.TableType tableType) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getTablesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getTableMeta
public List<org.apache.hadoop.hive.metastore.api.TableMeta> getTableMeta(String dbName, String tableNames, List<String> tableTypes) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getTableMetain interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getTableObjectsByName
public List<org.apache.hadoop.hive.metastore.api.Table> getTableObjectsByName(String dbName, List<String> tableNames) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.UnknownDBException
- Specified by:
getTableObjectsByNamein interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.UnknownDBException
-
getAllTables
public List<String> getAllTables(String dbName) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getAllTablesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
listTableNamesByFilter
public List<String> listTableNamesByFilter(String dbName, String filter, short maxTables) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.UnknownDBException
- Specified by:
listTableNamesByFilterin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.UnknownDBException
-
listPartitionNames
public List<String> listPartitionNames(String dbName, String tblName, short maxParts) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
listPartitionNamesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
listPartitionValues
public org.apache.hadoop.hive.metastore.api.PartitionValuesResponse listPartitionValues(String dbName, String tblName, List<org.apache.hadoop.hive.metastore.api.FieldSchema> cols, boolean applyDistinct, String filter, boolean ascending, List<org.apache.hadoop.hive.metastore.api.FieldSchema> order, long maxParts) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
listPartitionValuesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
alterPartition
public void alterPartition(String dbName, String tblName, List<String> partVals, org.apache.hadoop.hive.metastore.api.Partition newPart) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
alterPartitionin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
alterPartitions
public void alterPartitions(String dbName, String tblName, List<List<String>> partValsList, List<org.apache.hadoop.hive.metastore.api.Partition> newParts) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
alterPartitionsin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.MetaException
-
getPartitionsByFilter
public List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByFilter(String dbName, String tblName, String filter, short maxParts) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getPartitionsByFilterin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
getPartitionsByExpr
public boolean getPartitionsByExpr(String dbName, String tblName, byte[] expr, String defaultPartitionName, short maxParts, List<org.apache.hadoop.hive.metastore.api.Partition> result) throws org.apache.thrift.TException
- Specified by:
getPartitionsByExprin interfaceNessieStore- Throws:
org.apache.thrift.TException
-
getNumPartitionsByFilter
public int getNumPartitionsByFilter(String dbName, String tblName, String filter) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getNumPartitionsByFilterin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
getNumPartitionsByExpr
public int getNumPartitionsByExpr(String dbName, String tblName, byte[] expr) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getNumPartitionsByExprin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
getPartitionsByNames
public List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByNames(String dbName, String tblName, List<String> partNames) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getPartitionsByNamesin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
listPartitionsPsWithAuth
public List<org.apache.hadoop.hive.metastore.api.Partition> listPartitionsPsWithAuth(String dbName, String tblName, List<String> partVals, short maxParts, String userName, List<String> groupNames) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
listPartitionsPsWithAuthin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.InvalidObjectExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
getMetaStoreSchemaVersion
public String getMetaStoreSchemaVersion() throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
getMetaStoreSchemaVersionin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
listPartitionNamesByFilter
public List<String> listPartitionNamesByFilter(String dbName, String tblName, String filter, short maxParts) throws org.apache.hadoop.hive.metastore.api.MetaException
- Specified by:
listPartitionNamesByFilterin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getDatabaseCount
public int getDatabaseCount() throws org.apache.hadoop.hive.metastore.api.MetaException- Specified by:
getDatabaseCountin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getTableCount
public int getTableCount() throws org.apache.hadoop.hive.metastore.api.MetaException- Specified by:
getTableCountin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getPartitionCount
public int getPartitionCount() throws org.apache.hadoop.hive.metastore.api.MetaException- Specified by:
getPartitionCountin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaException
-
getPartitionColsWithStats
public Map<String,List<String>> getPartitionColsWithStats(String dbName, String tableName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
- Specified by:
getPartitionColsWithStatsin interfaceNessieStore- Throws:
org.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectException
-
-