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



##########
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:
       No, it will fall back to older behavior.




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to