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

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

                Author: ASF GitHub Bot
            Created on: 07/Mar/23 14:07
            Start Date: 07/Mar/23 14:07
    Worklog Time Spent: 10m 
      Work Description: SourabhBadhya commented on code in PR #4098:
URL: https://github.com/apache/hive/pull/4098#discussion_r1127915943


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MetaStoreCompactorThread.java:
##########
@@ -66,12 +66,7 @@ public void init(AtomicBoolean stop) throws Exception {
   }
 
   @Override Table resolveTable(CompactionInfo ci) throws MetaException {
-    try {
-      return getMSForConf(conf).getTable(getDefaultCatalog(conf), ci.dbname, 
ci.tableName);
-    } catch (MetaException e) {
-      LOG.error("Unable to find table " + ci.getFullTableName() + ", " + 
e.getMessage());
-      throw e;
-    }
+    return CompactorUtil.resolveTable(conf, ci.dbname, ci.tableName);

Review Comment:
   Its also a utility method used across Initiator and worker. To reduce common 
code, I made it use the static function in `CompactorUtil`. Also removing this 
and using `CompactorUtil.resolveTable`, will make tests use static mocking 
which is undesirable.
   
   





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

    Worklog Id:     (was: 849559)
    Time Spent: 2h 50m  (was: 2h 40m)

> Use Caffeine for caching metadata objects in Compactor threads
> --------------------------------------------------------------
>
>                 Key: HIVE-27122
>                 URL: https://issues.apache.org/jira/browse/HIVE-27122
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Sourabh Badhya
>            Assignee: Sourabh Badhya
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Currently, compactor threads make use of Guava package to cache metadata 
> objects like database/table objects. We should consider using Caffeine 
> package since it provides more control on the cache. It is also observed that 
> cache created from Caffeine package is more performant than cache created 
> from Guava package.
> Some benchmarks comparing Caffeine package vs Guava package - 
> [https://github.com/ben-manes/caffeine/wiki/Benchmarks]



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

Reply via email to