[
https://issues.apache.org/jira/browse/HIVE-26443?focusedWorklogId=806302&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-806302
]
ASF GitHub Bot logged work on HIVE-26443:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Sep/22 08:52
Start Date: 06/Sep/22 08:52
Worklog Time Spent: 10m
Work Description: veghlaci05 commented on code in PR #3513:
URL: https://github.com/apache/hive/pull/3513#discussion_r963439087
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -259,15 +268,32 @@ private void scheduleCompactionIfRequired(CompactionInfo
ci, Table t, Partition
}
}
- private Table resolveTableAndCache(CompactionInfo ci) throws MetaException {
- if (tableCache.isPresent()) {
+ private String getPoolName(CompactionInfo ci, Table t) throws Exception {
+ String poolName =
t.getParameters().get(Constants.HIVE_COMPACTOR_WORKER_POOL);
+ if (StringUtils.isBlank(poolName)) {
+ poolName = obtainObject(ci.dbname, () ->
resolveDatabase(ci)).getParameters().get(Constants.HIVE_COMPACTOR_WORKER_POOL);
+ }
+ return poolName;
+ }
+
+ private <T extends TBase<T,?>> T obtainObject(String key, Callable<T>
callable) throws Exception {
+ if (dbCache.isPresent()) {
try {
- return tableCache.get().get(ci.getFullTableName(), () ->
resolveTable(ci));
+ return (T)dbCache.get().get(key, callable);
} catch (ExecutionException e) {
- throw (MetaException) e.getCause();
+ throw (Exception) e.getCause();
Review Comment:
`e.getCause()` returns `Throwable`, but did not want to declare that in
throws clause, since it will be an `Exception` for sure.
Issue Time Tracking
-------------------
Worklog Id: (was: 806302)
Time Spent: 13h 40m (was: 13.5h)
> Add priority queueing to compaction
> -----------------------------------
>
> Key: HIVE-26443
> URL: https://issues.apache.org/jira/browse/HIVE-26443
> Project: Hive
> Issue Type: New Feature
> Reporter: László Végh
> Assignee: László Végh
> Priority: Major
> Labels: pull-request-available
> Attachments: Pool based compaction queues.docx
>
> Time Spent: 13h 40m
> Remaining Estimate: 0h
>
> The details can be found in the attached design doc.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)