pkumarsinha commented on a change in pull request #2121:
URL: https://github.com/apache/hive/pull/2121#discussion_r672052456



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -1090,6 +1180,26 @@ Long bootStrapDump(Path dumpRoot, DumpMetaData dmd, Path 
cmRoot, Hive hiveDb)
     }
   }
 
+  private void unsetReplFailoverEnabled(Database db) throws HiveException {
+    Map<String, String> dbProps = db.getParameters();
+    if (dbProps != null && 
dbProps.containsKey(ReplConst.REPL_FAILOVER_ENABLED)) {
+      dbProps.remove(ReplConst.REPL_FAILOVER_ENABLED);
+      db.setParameters(dbProps);
+      getHive().alterDatabase(work.dbNameOrPattern, db);
+    }
+  }
+
+  private void setReplFailoverEnabled(Database db) throws HiveException {
+    Map<String, String> params = db.getParameters();
+    if (params != null) {
+      params.put(ReplConst.REPL_FAILOVER_ENABLED, ReplConst.TRUE);
+      db.setParameters(params);

Review comment:
       Might not be needed




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to