[
https://issues.apache.org/jira/browse/HIVE-27122?focusedWorklogId=849555&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-849555
]
ASF GitHub Bot logged work on HIVE-27122:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Mar/23 13:54
Start Date: 07/Mar/23 13:54
Worklog Time Spent: 10m
Work Description: SourabhBadhya commented on code in PR #4098:
URL: https://github.com/apache/hive/pull/4098#discussion_r1127897811
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorUtil.java:
##########
@@ -74,6 +77,40 @@ static Runnable unchecked(ThrowingRunnable<?> r) {
}
}
+ /**
+ * An interface to create {@link Function} which can throw exceptions.
+ * This is especially useful when we pass lambda-expressions which embed
functions which throw exceptions
+ * @param <T> the type of the input to the function
+ * @param <R> the type of the result of the function
+ * @param <E> the exception that is being thrown by the function
+ */
+ public interface ThrowingFunction<T, R, E extends Exception> {
Review Comment:
See above comment
Issue Time Tracking
-------------------
Worklog Id: (was: 849555)
Time Spent: 2h 20m (was: 2h 10m)
> 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 20m
> 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)