[
https://issues.apache.org/jira/browse/HIVE-26716?focusedWorklogId=829333&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-829333
]
ASF GitHub Bot logged work on HIVE-26716:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Nov/22 14:07
Start Date: 28/Nov/22 14:07
Worklog Time Spent: 10m
Work Description: veghlaci05 commented on code in PR #3746:
URL: https://github.com/apache/hive/pull/3746#discussion_r1033586801
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java:
##########
@@ -80,6 +80,15 @@ public class Worker extends RemoteCompactorThread implements
MetaStoreThread {
static final private long SLEEP_TIME = 10000;
private String workerName;
+ private final CompactorFactory compactorFactory;
+
+ public Worker() {
+ compactorFactory = CompactorFactory.getInstance();
+ }
+
+ public Worker(CompactorFactory compactorFactory) {
+ this.compactorFactory = compactorFactory;
Review Comment:
It was done that way before, @kasakrisz requested to add a constructor
instead.
Personally I rather agree with him, on the long run I would like to
eliminate usage of static methods and singletons in compaction related classes
whenever possible, and replace them with instance fields. Providing
dependencies via constructor would make testing easier, and would allow devs to
discover and control class dependencies much easier. It would also allow to
introduce dependency injection easier in the future. I doubt it will happen but
hope dies last :)
Issue Time Tracking
-------------------
Worklog Id: (was: 829333)
Time Spent: 14h 20m (was: 14h 10m)
> Query based Rebalance compaction on full acid tables
> ----------------------------------------------------
>
> Key: HIVE-26716
> URL: https://issues.apache.org/jira/browse/HIVE-26716
> Project: Hive
> Issue Type: Sub-task
> Components: Hive
> Reporter: László Végh
> Assignee: László Végh
> Priority: Major
> Labels: ACID, compaction, pull-request-available
> Time Spent: 14h 20m
> Remaining Estimate: 0h
>
> Support rebalancing compaction on fully ACID tables.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)