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

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

                Author: ASF GitHub Bot
            Created on: 04/Jun/21 08:00
            Start Date: 04/Jun/21 08:00
    Worklog Time Spent: 10m 
      Work Description: hmangla98 commented on a change in pull request #2311:
URL: https://github.com/apache/hive/pull/2311#discussion_r645236553



##########
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:
       We already had two separate methods declared in both ReplUtils and 
PartitionManagementTask because ReplUtils package is not accessible in 
MetastoreThreads. But it can be moved to MetastoreUtils where it can be 
accessible by both of them.




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

> 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: 4h 20m
>  Remaining Estimate: 0h
>




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

Reply via email to