[ https://issues.apache.org/jira/browse/HIVE-24918?focusedWorklogId=626379&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-626379 ]
ASF GitHub Bot logged work on HIVE-24918: ----------------------------------------- Author: ASF GitHub Bot Created on: 22/Jul/21 00:03 Start Date: 22/Jul/21 00:03 Worklog Time Spent: 10m Work Description: hmangla98 commented on a change in pull request #2121: URL: https://github.com/apache/hive/pull/2121#discussion_r674421491 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java ########## @@ -268,11 +329,35 @@ private boolean shouldDumpAtlasMetadata() { return conf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_ATLAS_METADATA); } - private Path getCurrentDumpPath(Path dumpRoot, boolean isBootstrap) throws IOException { + private Path getCurrentDumpPath(Path dumpRoot, boolean isBootstrap) throws IOException, HiveException { Path lastDumpPath = ReplUtils.getLatestDumpPath(dumpRoot, conf); if (lastDumpPath != null && shouldResumePreviousDump(lastDumpPath, isBootstrap)) { //Resume previous dump LOG.info("Resuming the dump with existing dump directory {}", lastDumpPath); + FileSystem fs = lastDumpPath.getFileSystem(conf); + Path hiveDumpDir = new Path(lastDumpPath, ReplUtils.REPL_HIVE_BASE_DIR); + Path failoverMetadataFile = new Path(hiveDumpDir, FailoverMetaData.FAILOVER_METADATA); + Path failoverReadyMarkerFile = new Path(hiveDumpDir, ReplAck.FAILOVER_READY_MARKER.toString()); + if (fs.exists(failoverReadyMarkerFile)) { + //If failoverReadyMarkerFile exists, this means previous dump iteration failed while creating dump ACK file. + //So, just delete this file and proceed further. + LOG.info("Deleting failover ready marker file: {} created in previous dump iteration.", failoverReadyMarkerFile); + fs.delete(failoverReadyMarkerFile, true); + } + if (fs.exists(failoverMetadataFile)) { + //If failoverMetadata file exists, this means previous dump iteration failed after writing failover metadata info Review comment: yes, that's the reason we've used nested configuration check in this. -- 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-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 626379) Time Spent: 7h 20m (was: 7h 10m) > Handle failover case during Repl Dump > ------------------------------------- > > Key: HIVE-24918 > URL: https://issues.apache.org/jira/browse/HIVE-24918 > Project: Hive > Issue Type: New Feature > Reporter: Haymant Mangla > Assignee: Haymant Mangla > Priority: Major > Labels: pull-request-available > Time Spent: 7h 20m > Remaining Estimate: 0h > > To handle: > a) Whenever user wants to go ahead with failover, during the next or > subsequent repl dump operation upon confirming that there are no pending open > transaction events, It should create a _failover_ready marker file in the > dump dir. This marker file would contain scheduled query name > that has generated this dump. > b) Skip next repl dump instances once we have the marker file placed. -- This message was sent by Atlassian Jira (v8.3.4#803005)