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

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

                Author: ASF GitHub Bot
            Created on: 03/Jun/21 19:05
            Start Date: 03/Jun/21 19:05
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on a change in pull request #2311:
URL: https://github.com/apache/hive/pull/2311#discussion_r645057607



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
##########
@@ -210,27 +213,34 @@ private void stopWorkers() {
     }
   }
 
-  private List<AnalyzeWork> processOneTable(TableName fullTableName)
+  private List<AnalyzeWork> processOneTable(TableName fullTableName, 
Map<String, Boolean> dbsToSkip)
       throws MetaException, NoSuchTxnException, NoSuchObjectException {
     if (isAnalyzeTableInProgress(fullTableName)) return null;
     String cat = fullTableName.getCat(), db = fullTableName.getDb(), tbl = 
fullTableName.getTable();
+    String dbName = MetaStoreUtils.prependCatalogToDbName(cat,db, conf);
+    if (!dbsToSkip.containsKey(dbName)) {
+      Database database = rs.getDatabase(cat, db);
+      boolean skipDb = false;
+      if (MetaStoreUtils.isDbBeingFailedOver(database)) {
+        skipDb = true;
+        LOG.info("Skipping all the tables which belong to database: {} as it 
is being failed over", db);
+      } else if (ReplUtils.isTargetOfReplication(database)) {

Review comment:
       There is lot of code duplication between this and PartitionManagement. 
Can we make not achieve by having a single copy?
   Also,  why do we have two methods for isTargetOfReplication(), can we have 
just one?




-- 
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: 606133)
    Time Spent: 3h 50m  (was: 3h 40m)

> Disable StatsUpdaterThread and PartitionManagementTask for db that is being 
> failoved over.
> ------------------------------------------------------------------------------------------
>
>                 Key: HIVE-25154
>                 URL: https://issues.apache.org/jira/browse/HIVE-25154
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Haymant Mangla
>            Assignee: Haymant Mangla
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>




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

Reply via email to