sankarh commented on a change in pull request #628: HIVE-21731 : Hive import 
fails, post upgrade of source 3.0 cluster, to a target 4.0 cluster with strict 
managed table set to true.
URL: https://github.com/apache/hive/pull/628#discussion_r284966493
 
 

 ##########
 File path: 
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/WarehouseInstance.java
 ##########
 @@ -563,7 +563,21 @@ public void testEventCounts(String dbName, long 
fromEventId, Long toEventId, Int
   }
 
   public boolean isAcidEnabled() {
-    return hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY);
+    if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY) &&
+        
hiveConf.getVar(HiveConf.ConfVars.HIVE_TXN_MANAGER).equals("org.apache.hadoop.hive.ql.lockmgr.DbTxnManager"))
 {
+      return true;
+    }
+    return false;
+  }
+
+  public void disableAcid() {
+    hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
+    hiveConf.setVar(HiveConf.ConfVars.HIVE_TXN_MANAGER, 
"org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager");
+  }
+
+  public void enableAcid() {
+    hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, true);
+    hiveConf.setVar(HiveConf.ConfVars.HIVE_TXN_MANAGER, 
"org.apache.hadoop.hive.ql.lockmgr.DbTxnManager");
 
 Review comment:
   It is working for this test because, replica warehouse is acid enabled and 
it initialises the derby DB which is shared by both warehouse instances. But, 
if both primary and replica are acid disabled, then this won't work if you 
dynamically change this config.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to