[ 
https://issues.apache.org/jira/browse/HIVE-24733?focusedWorklogId=553054&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-553054
 ]

ASF GitHub Bot logged work on HIVE-24733:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Feb/21 16:35
            Start Date: 16/Feb/21 16:35
    Worklog Time Spent: 10m 
      Work Description: 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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 553054)
    Time Spent: 1h 10m  (was: 1h)

> 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: 1h 10m
>  Remaining Estimate: 0h
>
> {color:#172b4d} {color}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to