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



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java
##########
@@ -162,7 +162,8 @@ private void initiateAuthorizationLoadTask() throws 
SemanticException {
     if 
(RANGER_AUTHORIZER.equalsIgnoreCase(conf.getVar(HiveConf.ConfVars.REPL_AUTHORIZATION_PROVIDER_SERVICE)))
 {
       Path rangerLoadRoot = new Path(new Path(work.dumpDirectory).getParent(), 
ReplUtils.REPL_RANGER_BASE_DIR);
       LOG.info("Adding Import Ranger Metadata Task from {} ", rangerLoadRoot);
-      RangerLoadWork rangerLoadWork = new RangerLoadWork(rangerLoadRoot, 
work.getSourceDbName(), work.dbNameToLoadIn,
+      String targetDbName = StringUtils.isEmpty(work.dbNameToLoadIn) ? 
work.getSourceDbName() : work.dbNameToLoadIn;

Review comment:
       When is the target db name derived from source? When both are same?
   

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java
##########
@@ -162,7 +162,8 @@ private void initiateAuthorizationLoadTask() throws 
SemanticException {
     if 
(RANGER_AUTHORIZER.equalsIgnoreCase(conf.getVar(HiveConf.ConfVars.REPL_AUTHORIZATION_PROVIDER_SERVICE)))
 {
       Path rangerLoadRoot = new Path(new Path(work.dumpDirectory).getParent(), 
ReplUtils.REPL_RANGER_BASE_DIR);
       LOG.info("Adding Import Ranger Metadata Task from {} ", rangerLoadRoot);
-      RangerLoadWork rangerLoadWork = new RangerLoadWork(rangerLoadRoot, 
work.getSourceDbName(), work.dbNameToLoadIn,
+      String targetDbName = StringUtils.isEmpty(work.dbNameToLoadIn) ? 
work.getSourceDbName() : work.dbNameToLoadIn;

Review comment:
       Will the same issue be there with AtlasLoadWork as well?




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to