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

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

                Author: ASF GitHub Bot
            Created on: 09/Jan/23 12:04
            Start Date: 09/Jan/23 12:04
    Worklog Time Spent: 10m 
      Work Description: veghlaci05 commented on code in PR #3864:
URL: https://github.com/apache/hive/pull/3864#discussion_r1064566995


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java:
##########
@@ -96,6 +100,7 @@ public class Cleaner extends MetaStoreCompactorThread {
   static final private String CLASS_NAME = Cleaner.class.getName();
   static final private Logger LOG = LoggerFactory.getLogger(CLASS_NAME);
   private boolean metricsEnabled = false;
+  private Optional<Cache<String, TBase>> metaCache = Optional.empty();

Review Comment:
   You could use an abstract boolean useCache() method in 
MetastoreCompactorThread, (and implement in Initiator and Cleaner respectively) 
and move the metaCache field and the init logic there. As a result 
computeIfAbsent should not take metaCache as an argument, and caching could be 
hidden from the subclasses.





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

    Worklog Id:     (was: 837907)
    Time Spent: 1h 10m  (was: 1h)

> Compactor: Cleaner shouldn't fetch table details again and again for 
> partitioned tables
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-26825
>                 URL: https://issues.apache.org/jira/browse/HIVE-26825
>             Project: Hive
>          Issue Type: Improvement
>          Components: Transactions
>            Reporter: KIRTI RUGE
>            Assignee: KIRTI RUGE
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Cleaner shouldn't be fetch table/partition details for all its partitions. 
> When there are large number of databases/tables, it takes lot of time for 
> Initiator to complete its initial iteration and load on DB also goes higher.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to