[
https://issues.apache.org/jira/browse/HIVE-27122?focusedWorklogId=849473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-849473
]
ASF GitHub Bot logged work on HIVE-27122:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Mar/23 06:48
Start Date: 07/Mar/23 06:48
Worklog Time Spent: 10m
Work Description: akshat0395 commented on code in PR #4098:
URL: https://github.com/apache/hive/pull/4098#discussion_r1127398769
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorUtil.java:
##########
@@ -133,6 +150,24 @@ public static List<Partition>
getPartitionsByNames(HiveConf conf, String dbName,
}
}
+ public static Database resolveDatabase(HiveConf conf, String dbName) throws
MetaException, NoSuchObjectException {
+ try {
+ return
getMSForConf(conf).getDatabase(MetaStoreUtils.getDefaultCatalog(conf), dbName);
+ } catch (NoSuchObjectException e) {
+ LOG.error("Unable to find database {}, {}", dbName, e.getMessage());
+ throw e;
+ }
+ }
+
+ public static Table resolveTable(HiveConf conf, String dbName, String
tableName) throws MetaException {
+ try {
+ return
getMSForConf(conf).getTable(MetaStoreUtils.getDefaultCatalog(conf), dbName,
tableName);
+ } catch (MetaException e) {
+ LOG.error("Unable to find database {}, {}", dbName, e.getMessage());
Review Comment:
This method is resolving for table, This log should be `Unable to find Table
{}, {}`, tableName
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorUtil.java:
##########
@@ -74,6 +77,20 @@ static Runnable unchecked(ThrowingRunnable<?> r) {
}
}
+ public interface ThrowingFunction<T, R, E extends Exception> {
Review Comment:
Can we please add comments to this method to reduce the cognitive complexity
of this method
Issue Time Tracking
-------------------
Worklog Id: (was: 849473)
Time Spent: 50m (was: 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: 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)