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

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

                Author: ASF GitHub Bot
            Created on: 05/Apr/21 20:09
            Start Date: 05/Apr/21 20:09
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on a change in pull request #2092:
URL: https://github.com/apache/hive/pull/2092#discussion_r607283772



##########
File path: 
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenariosAcrossInstances.java
##########
@@ -1558,6 +1569,16 @@ public Boolean apply(NotificationEvent entry) {
             .run(" drop database if exists " + replicatedDbName_CM + " 
cascade");
   }
 
+  private void compareDbProperties(Map<String, String> primaryDbProps, 
Map<String, String> replicaDbProps){
+    for(Map.Entry<String, String> prop : primaryDbProps.entrySet()) {

Review comment:
       nit: whitespace after for -> for (Map.Entry<String, String> prop : 
primaryDbProps.entrySet()) {
   

##########
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:
       Shouldn't this be done at the beginning of incremental load and not at 
the end. Else, during controlled failover, the events will be loaded first and 
then only this property would be set. If there is bootstrap dump attempted on 
src, that would pass.

##########
File path: 
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -116,6 +116,7 @@
 import static org.apache.hadoop.hive.ql.exec.repl.ReplAck.DUMP_ACKNOWLEDGEMENT;
 import static 
org.apache.hadoop.hive.ql.exec.repl.ReplAck.NON_RECOVERABLE_MARKER;
 import static 
org.apache.hadoop.hive.ql.parse.repl.load.DumpMetaData.DUMP_METADATA;
+import static 
org.apache.hadoop.hive.ql.exec.repl.util.ReplUtils.TARGET_OF_REPLICATION;

Review comment:
       This is unused?

##########
File path: 
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenariosAcrossInstances.java
##########
@@ -1114,13 +1115,18 @@ public void 
testIfCkptAndSourceOfReplPropsIgnoredByReplDump() throws Throwable {
             .dump(primaryDbName, Collections.emptyList());
 
     // Incremental Repl A -> B with alters on db/table/partition
-    WarehouseInstance.Tuple tupleReplicaInc = replica.load(replicatedDbName, 
primaryDbName)
-            .run("repl status " + replicatedDbName)
+    replica.load(replicatedDbName, primaryDbName);

Review comment:
       why not to have a separate test for the above steps?




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


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

    Worklog Id:     (was: 577090)
    Time Spent: 1h 40m  (was: 1.5h)

> Support to add repl.target.for property during incremental run
> --------------------------------------------------------------
>
>                 Key: HIVE-24912
>                 URL: https://issues.apache.org/jira/browse/HIVE-24912
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Haymant Mangla
>            Assignee: Haymant Mangla
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




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

Reply via email to