[ https://issues.apache.org/jira/browse/HIVE-24733?focusedWorklogId=552827&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-552827 ]
ASF GitHub Bot logged work on HIVE-24733: ----------------------------------------- Author: ASF GitHub Bot Created on: 16/Feb/21 05:59 Start Date: 16/Feb/21 05:59 Worklog Time Spent: 10m Work Description: aasha commented on a change in pull request #1942: URL: https://github.com/apache/hive/pull/1942#discussion_r576563534 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java ########## @@ -245,7 +245,9 @@ a database ( directory ) scope.database = true; } dbTracker.debugLog("database"); - dbEventFound = true; + if (scope.database) { Review comment: Do you need a separate check? Can be done at the same place where scope.database is set to true ########## File path: itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java ########## @@ -485,6 +485,9 @@ private Task getReplLoadRootTask(String sourceDb, String replicadb, boolean isIn metricCollector = new BootstrapLoadMetricCollector(replicadb, tuple.dumpLocation, 0, confTemp); } + /* When 'hive.repl.retain.custom.db.locations.on.target' is enabled, the first iteration of repl load would + run only database creation task, and only in next iteration of Repl Load Task execution, remaining tasks will be + executed. Hence disabling this to perform the test on task optimization. */ Review comment: its also because the locations would overwrite and things like that right? ########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/LoadDatabase.java ########## @@ -96,6 +98,26 @@ Database readDbMetadata() throws SemanticException { return event.dbInMetadata(dbNameToLoadIn); } + String getDbLocation(Database dbInMetadata) { + if (context.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_RETAIN_CUSTOM_LOCATIONS_FOR_DB_ON_TARGET) + && Boolean.parseBoolean(dbInMetadata.getParameters().get(ReplUtils.REPL_IS_CUSTOM_DB_LOC))) { + String locOnTarget = new Path(dbInMetadata.getLocationUri()).toUri().getPath().toString(); + LOG.info("Using the custom location {} on the target", locOnTarget); + return locOnTarget; + } + return null; + } + + String getDbManagedLocation(Database dbInMetadata) { + if (context.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_RETAIN_CUSTOM_LOCATIONS_FOR_DB_ON_TARGET) + && Boolean.parseBoolean(dbInMetadata.getParameters().get(ReplUtils.REPL_IS_CUSTOM_DB_MANAGEDLOC))) { Review comment: this might cause backward compatibility issue? ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 552827) Time Spent: 50m (was: 40m) > Handle replication when db location and managed location is set to custom > location on source > -------------------------------------------------------------------------------------------- > > Key: HIVE-24733 > URL: https://issues.apache.org/jira/browse/HIVE-24733 > Project: Hive > Issue Type: Task > Reporter: Pravin Sinha > Assignee: Pravin Sinha > Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > {color:#172b4d} {color} -- This message was sent by Atlassian Jira (v8.3.4#803005)