[
https://issues.apache.org/jira/browse/HIVE-26443?focusedWorklogId=802031&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-802031
]
ASF GitHub Bot logged work on HIVE-26443:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Aug/22 14:57
Start Date: 19/Aug/22 14:57
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3513:
URL: https://github.com/apache/hive/pull/3513#discussion_r950284666
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java:
##########
@@ -90,8 +94,23 @@ private String getPartitionName(Table table) throws
HiveException {
}
private CompactionResponse compact(Table table, String partitionName) throws
HiveException {
- CompactionResponse resp = context.getDb().compact2(table.getDbName(),
table.getTableName(), partitionName,
- desc.getCompactionType(), desc.getProperties());
+ CompactionType compactionType = null;
+ String strType = desc.getCompactionType();
+ if ("major".equalsIgnoreCase(strType)) {
+ compactionType = CompactionType.MAJOR;
+ } else if ("minor".equalsIgnoreCase(strType)) {
+ compactionType = CompactionType.MINOR;
+ } else {
+ throw new RuntimeException("Unknown compaction type " + strType);
+ }
+
+ CompactionRequest req = new CompactionRequest(table.getDbName(),
table.getTableName(), compactionType);
+ req.setPartitionname(partitionName);
+ req.setPoolName(desc.getPoolName());
+ req.setProperties(desc.getProperties());
+ req.setInitiatorId(JavaUtils.hostname() + "-" +
HiveMetaStoreClient.MANUALLY_INITIATED_COMPACTION);
+
req.setInitiatorVersion(HiveMetaStoreClient.class.getPackage().getImplementationVersion());
+ CompactionResponse resp = context.getDb().compact3(req);
Review Comment:
you can just overload the method. New one is accepting CompactionRequest
object
Issue Time Tracking
-------------------
Worklog Id: (was: 802031)
Time Spent: 1h 50m (was: 1h 40m)
> 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: 1h 50m
> Remaining Estimate: 0h
>
> The details can be found in the attached design doc.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)