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

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

                Author: ASF GitHub Bot
            Created on: 28/Jan/21 11:24
            Start Date: 28/Jan/21 11:24
    Worklog Time Spent: 10m 
      Work Description: aasha commented on a change in pull request #1897:
URL: https://github.com/apache/hive/pull/1897#discussion_r566018031



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -873,6 +876,27 @@ Long bootStrapDump(Path dumpRoot, DumpMetaData dmd, Path 
cmRoot, Hive hiveDb)
           throw new HiveException("Replication dump not allowed for replicated 
database" +
                   " with first incremental dump pending : " + dbName);
         }
+
+        if (db != null && !HiveConf.getBoolVar(conf, REPL_DUMP_METADATA_ONLY)) 
{
+          if (!ReplChangeManager.isSourceOfReplication(db)) {
+            // Check if the schedule name is available else set the query value
+            // as default.
+            String value = conf.get(SCHEDULED_QUERY_SCHEDULENAME,
+                "default_" + getQueryState().getQueryString());
+            updateReplSourceFor(hiveDb, dbName, db, value);
+          } else {
+            // If a schedule name is available and that isn't part of the
+            // existing conf, append the schedule name to the conf.
+            String scheduleQuery = conf.get(SCHEDULED_QUERY_SCHEDULENAME);
+            if (scheduleQuery != null && !scheduleQuery.isEmpty()) {

Review comment:
       Can use stringutil method instead of adding multiple checks




----------------------------------------------------------------
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: 543584)
    Time Spent: 1h 20m  (was: 1h 10m)

> Set repl.source.for property in the db if db is under replication
> -----------------------------------------------------------------
>
>                 Key: HIVE-24674
>                 URL: https://issues.apache.org/jira/browse/HIVE-24674
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Add repl.source.for property in the database in case not already set, if the 
> database is under replication.



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

Reply via email to