You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/10/12 02:32:07 UTC

[GitHub] [hive] hmangla98 commented on a change in pull request #2707: HIVE-25602: Fix failover metadata file path in repl load execution.

hmangla98 commented on a change in pull request #2707:
URL: https://github.com/apache/hive/pull/2707#discussion_r726713731



##########
File path: itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestScheduledReplicationScenarios.java
##########
@@ -251,6 +253,97 @@ public void testExternalTablesReplLoadBootstrapIncr() throws Throwable {
     }
   }
 
+  @Test
+  public void testCompleteFailoverWithReverseBootstrap() throws Throwable {
+    String withClause =
+            "'" + HiveConf.ConfVars.HIVE_IN_TEST + "' = 'true'" + ",'"
+                    + HiveConf.ConfVars.REPL_SOURCE_CLUSTER_NAME + "' = 'cluster0'"
+                    + ",'" + HiveConf.ConfVars.REPL_TARGET_CLUSTER_NAME
+                    + "' = 'cluster1'";
+
+    // Create a table with some data at source DB.
+    primary.run("use " + primaryDbName).run("create table t2 (id int)")
+            .run("insert into t2 values(1)").run("insert into t2 values(2)");
+
+    // Schedule Dump & Load and verify the data is replicated properly.
+    try (ScheduledQueryExecutionService schqS = ScheduledQueryExecutionService
+            .startScheduledQueryExecutorService(primary.hiveConf)) {
+      int next = -1;
+      ReplDumpWork.injectNextDumpDirForTest(String.valueOf(next), true);
+      primary.run("create scheduled query repl_dump_p1 every 5 seconds as repl dump "
+              + primaryDbName +  " WITH(" + withClause + ')');

Review comment:
       This will by-default choose different dump directories for both the policies since db_name is different. We can't choose same db_name for src and replica as we are testing this in single cluster only.




-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org