deniskuzZ commented on code in PR #3513:
URL: https://github.com/apache/hive/pull/3513#discussion_r959606368
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -270,6 +281,27 @@ private Table resolveTableAndCache(CompactionInfo ci)
throws MetaException {
return resolveTable(ci);
}
+ private Database resolveDatabaseAndCache(CompactionInfo ci) throws
MetaException, NoSuchObjectException {
+ if (dbCache.isPresent()) {
+ try {
+ return dbCache.get().get(ci.dbname, () -> resolveDatabase(ci));
+ } catch (ExecutionException e) {
+ throw (MetaException) e.getCause();
+ }
+ }
+ return resolveDatabase(ci);
+ }
+
+ private Database resolveDatabase(CompactionInfo ci) throws MetaException,
NoSuchObjectException {
Review Comment:
could we create a generic method that uses the pool, key and callable?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]