hmangla98 commented on a change in pull request #2097:
URL: https://github.com/apache/hive/pull/2097#discussion_r603763012
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -506,6 +506,8 @@ private static void populateLlapDaemonVarsSet(Set<String>
llapDaemonVarsSetLocal
"HDFS root scratch dir for Hive jobs which gets created with write all
(733) permission. " +
"For each connecting user, an HDFS scratch dir:
${hive.exec.scratchdir}/<username> is created, " +
"with ${hive.scratch.dir.permission}."),
+ HIVE_REPL_FAILOVER("hive.repl.failover.start",false,
Review comment:
Done
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -534,6 +562,37 @@ private boolean isTableSatifiesConfig(Table table) {
return true;
}
+ boolean isFailoverReadyState(long waitUntilTime) throws LockException {
+ List<TxnType> excludedTxns = Arrays.asList(TxnType.READ_ONLY,
TxnType.REPL_CREATED);
+ ValidTxnList validTxnList = getTxnMgr().getValidTxns(excludedTxns);
+
+ do {
+ List<Long> openTxnListForAllDbs = getOpenTxns(validTxnList);
+ if (openTxnListForAllDbs.isEmpty()) {
+ return true;
+ }
+ //check if all transactions that are open are inserted into the hive
locks table. If not wait and check again.
+ //Transactions table don't contain the db information. DB information is
present only in the hive locks table.
+ //Transactions are inserted into the hive locks table after compilation.
We need to make sure all transactions
+ //that are open have a entry in hive locks which can give us the db
information and then we only wait for open
+ //transactions for the db under replication and not for all open
transactions.
Review comment:
Done
--
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]