hmangla98 commented on a change in pull request #2092:
URL: https://github.com/apache/hive/pull/2092#discussion_r607433339



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/incremental/IncrementalLoadTasksBuilder.java
##########
@@ -163,6 +163,17 @@ public IncrementalLoadTasksBuilder(String dbName, String 
loadPath,
       taskChainTail.addDependentTask(updateIncPendTask);
       taskChainTail = updateIncPendTask;
 
+      Database dbToLoadIn = hive.getDatabase(dbName);
+      if (!ReplUtils.isTargetOfReplication(dbToLoadIn)) {
+        Map<String, String> props = new HashMap<>();
+        props.put(ReplUtils.TARGET_OF_REPLICATION, "true");
+        AlterDatabaseSetPropertiesDesc setTargetDesc = new 
AlterDatabaseSetPropertiesDesc(dbName, props, null);
+        Task<?> addReplTargetPropTask = TaskFactory.get(new DDLWork(inputs, 
outputs, setTargetDesc, true,
+                dumpDirectory, metricCollector), conf);
+        taskChainTail.addDependentTask(addReplTargetPropTask);
+        taskChainTail = addReplTargetPropTask;

Review comment:
       Done




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