deniskuzZ commented on a change in pull request #1688:
URL: https://github.com/apache/hive/pull/1688#discussion_r530247484
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -390,6 +404,42 @@ public void setConf(Configuration conf){
}
}
+ /**
+ * Check if min_history_level table is usable
+ * @return
+ * @throws MetaException
+ */
+ private boolean checkMinHistoryLevelTable(boolean configValue) throws
MetaException {
+ if (!configValue) {
+ // don't check it if disabled
+ return false;
+ }
+ Connection dbConn = null;
+ boolean tableExists = true;
+ try {
+ dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
+ try (Statement stmt = dbConn.createStatement()) {
+ // Dummy query to see if table exists
+ try (ResultSet rs = stmt.executeQuery("SELECT
MIN(\"MHL_MIN_OPEN_TXNID\") FROM \"MIN_HISTORY_LEVEL\"")) {
Review comment:
you can just select 1
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]