public final class TxnDbUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
cleanDb(org.apache.hadoop.conf.Configuration conf) |
static int |
countLockComponents(org.apache.hadoop.conf.Configuration conf,
long lockId)
A tool to count the number of partitions, tables,
and databases locked by a particular lockId.
|
static int |
countQueryAgent(org.apache.hadoop.conf.Configuration conf,
String countQuery)
Utility method used to run COUNT queries like "select count(*) from ..." against metastore tables
|
static void |
prepDb(org.apache.hadoop.conf.Configuration conf) |
static String |
queryToString(org.apache.hadoop.conf.Configuration conf,
String query) |
static String |
queryToString(org.apache.hadoop.conf.Configuration conf,
String query,
boolean includeHeader) |
static void |
setConfValues(org.apache.hadoop.conf.Configuration conf)
Set up the configuration so it will use the DbTxnManager, concurrency will be set to true,
and the JDBC configs will be set for putting the transaction and lock info in the embedded
metastore.
|
public static void setConfValues(org.apache.hadoop.conf.Configuration conf)
conf
- HiveConf to add these values topublic static void prepDb(org.apache.hadoop.conf.Configuration conf) throws Exception
Exception
public static void cleanDb(org.apache.hadoop.conf.Configuration conf) throws Exception
Exception
public static int countLockComponents(org.apache.hadoop.conf.Configuration conf, long lockId) throws Exception
lockId
- lock id to look for lock componentsException
public static int countQueryAgent(org.apache.hadoop.conf.Configuration conf, String countQuery) throws Exception
countQuery
- countQuery textException
public static String queryToString(org.apache.hadoop.conf.Configuration conf, String query) throws Exception
Exception
Copyright © 2022 The Apache Software Foundation. All rights reserved.