[
https://issues.apache.org/jira/browse/HIVE-24946?focusedWorklogId=630866&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-630866
]
ASF GitHub Bot logged work on HIVE-24946:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jul/21 01:07
Start Date: 29/Jul/21 01:07
Worklog Time Spent: 10m
Work Description: hmangla98 commented on a change in pull request #2529:
URL: https://github.com/apache/hive/pull/2529#discussion_r678750058
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenariosAcidTables.java
##########
@@ -319,31 +330,92 @@ public void testFailoverDuringDump() throws Throwable {
assertTrue(fs.exists(new Path(dumpPath,
ReplAck.LOAD_ACKNOWLEDGEMENT.toString())));
assertTrue(MetaStoreUtils.isDbBeingFailedOver(primary.getDatabase(primaryDbName)));
- dumpData = primary.dump(primaryDbName);
- dumpPath = new Path(dumpData.dumpLocation, ReplUtils.REPL_HIVE_BASE_DIR);
- Assert.assertEquals(new DumpMetaData(dumpPath, conf).getDumpType(),
DumpType.INCREMENTAL);
- Path failoverReadyFile = new Path(dumpPath,
ReplAck.FAILOVER_READY_MARKER.toString());
- Path failoverMdFile = new Path(dumpPath,
FailoverMetaData.FAILOVER_METADATA);
- assertFalse(fs.exists(failoverReadyFile));
- assertFalse(fs.exists(failoverMdFile));
-
assertFalse(MetaStoreUtils.isDbBeingFailedOver(primary.getDatabase(primaryDbName)));
- replica.load(replicatedDbName, primaryDbName);
- fs.create(failoverReadyFile);
- fs.create(failoverMdFile);
- assertTrue(fs.exists(failoverReadyFile));
- assertTrue(fs.exists(failoverMdFile));
+ primary.run("drop database if exists " + primaryDbName + " cascade");
- //Since the failover start config is disabled and previous valid dump
directory contains _failover_ready marker file
- //So, this dump iteration will perform bootstrap dump instead of
incremental and last dump directory also should not
- //deleted.
- WarehouseInstance.Tuple newDumpData = primary.dump(primaryDbName);
- assertNotEquals(newDumpData.dumpLocation, dumpData.dumpLocation);
+ assertTrue(primary.getDatabase(primaryDbName) == null);
+
+
assertTrue(ReplChangeManager.getReplPolicyIdString(replica.getDatabase(replicatedDbName))
== null);
+ WarehouseInstance.Tuple reverseDumpData = replica.dump(replicatedDbName);
+ assertNotEquals(reverseDumpData.dumpLocation, dumpData.dumpLocation);
assertTrue(fs.exists(dumpPath));
assertTrue(fs.exists(new Path(dumpPath,
ReplAck.FAILOVER_READY_MARKER.toString())));
- dumpPath = new Path(newDumpData.dumpLocation,
ReplUtils.REPL_HIVE_BASE_DIR);
+ dumpPath = new Path(reverseDumpData.dumpLocation,
ReplUtils.REPL_HIVE_BASE_DIR);
assertFalse(fs.exists(new Path(dumpPath,
FailoverMetaData.FAILOVER_METADATA)));
assertTrue(new DumpMetaData(dumpPath, conf).getDumpType() ==
DumpType.BOOTSTRAP);
+ assertTrue(fs.exists(new Path(dumpPath, DUMP_ACKNOWLEDGEMENT.toString())));
+
assertTrue(ReplUtils.isDbBeingFailedOverAtTarget(replica.getDatabase(replicatedDbName)));
Review comment:
Already 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 630866)
Time Spent: 50m (was: 40m)
> Handle failover case during Repl Load
> -------------------------------------
>
> Key: HIVE-24946
> URL: https://issues.apache.org/jira/browse/HIVE-24946
> Project: Hive
> Issue Type: New Feature
> Reporter: Haymant Mangla
> Assignee: Haymant Mangla
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> * Update metric during load to capture the readiness for failover
> * Remove repl.target.for property on target cluster
> * Prepare the dump directory to be used during failover first dump operation
--
This message was sent by Atlassian Jira
(v8.3.4#803005)