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



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -198,7 +223,12 @@ private void initiateDataCopyTasks() throws 
SemanticException {
       finishRemainingTasks();
     } else {
       DAGTraversal.traverse(childTasks, new 
AddDependencyToLeaves(TaskFactory.get(work, conf)));
-      this.childTasks = childTasks;

Review comment:
       Let's say, during an incremental run, you don't have any new table to 
bootstrap and you don't have even any external table in DB.
   List<Task<?>> childTasks = new ArrayList<>();
       childTasks.addAll(work.externalTableCopyTasks(taskTracker, conf));
       childTasks.addAll(work.managedTableCopyTasks(taskTracker, conf));
       if (childTasks.isEmpty()) {
         //All table data copy work finished.
         finishRemainingTasks();
       }
   This will go to finishRemainingTasks() immediately even though you have 
rangerDumpTask as childTask of ReplDumpTask

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -170,6 +175,26 @@ public int execute() {
     return 0;
   }
 
+  private void initiateAuthorizationDumpTask(Path currentDumpPath) throws 
SemanticException {
+    if 
(RANGER_AUTHORIZER.equalsIgnoreCase(conf.getVar(HiveConf.ConfVars.REPL_AUTHORIZATION_PROVIDER_SERVICE)))
 {
+      Path rangerDumpRoot = new Path(currentDumpPath, 
ReplUtils.REPL_RANGER_BASE_DIR);
+      LOG.info("Exporting Authorization Metadata at {} ", rangerDumpRoot);
+      RangerDumpWork rangerDumpWork = new RangerDumpWork(rangerDumpRoot, 
work.dbNameOrPattern);
+      Task<RangerDumpWork> rangerDumpTask = TaskFactory.get(rangerDumpWork, 
conf);
+      if (childTasks == null) {

Review comment:
       If it is considering Atlas task then it may be fine.




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