[
https://issues.apache.org/jira/browse/HIVE-27019?focusedWorklogId=845819&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-845819
]
ASF GitHub Bot logged work on HIVE-27019:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Feb/23 08:29
Start Date: 16/Feb/23 08:29
Worklog Time Spent: 10m
Work Description: veghlaci05 commented on code in PR #4032:
URL: https://github.com/apache/hive/pull/4032#discussion_r1108138034
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -39,38 +49,44 @@
import java.io.IOException;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.Callable;
import static org.apache.hadoop.hive.metastore.HMSHandler.getMSForConf;
import static
org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog;
/**
- * A runnable class which takes in handler and cleaning request and deletes
the files
+ * A runnable class which takes in cleaningRequestHandler and cleaning request
and deletes the files
* according to the cleaning request.
*/
-public class FSRemover implements ThrowingRunnable<MetaException> {
+public class FSRemover {
private static final Logger LOG = LoggerFactory.getLogger(FSRemover.class);
- private final Handler handler;
- private final CleaningRequest cr;
+ private final Map<CleaningRequest.RequestType, CleaningRequestHandler>
handlerMap;
Review Comment:
I like this approach!
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -194,8 +210,17 @@ private LockRequest createLockRequest(String dbName,
String tableName, String pa
}
Review Comment:
`protected LockRequest createLockRequest` is called only once, and it is the
only method calling the `private LockRequest createLockRequest`, so there is no
need for two overloads.
Issue Time Tracking
-------------------
Worklog Id: (was: 845819)
Time Spent: 5h 20m (was: 5h 10m)
> Split Cleaner into separate manageable modular entities
> -------------------------------------------------------
>
> Key: HIVE-27019
> URL: https://issues.apache.org/jira/browse/HIVE-27019
> Project: Hive
> Issue Type: Sub-task
> Reporter: Sourabh Badhya
> Assignee: Sourabh Badhya
> Priority: Major
> Labels: pull-request-available
> Time Spent: 5h 20m
> Remaining Estimate: 0h
>
> As described by the parent task -
> Cleaner can be divided into separate entities like -
> *1) Handler* - This entity fetches the data from the metastore DB from
> relevant tables and converts it into a request entity called CleaningRequest.
> It would also do SQL operations post cleanup (postprocess). Every type of
> cleaning request is provided by a separate handler.
> *2) Filesystem remover* - This entity fetches the cleaning requests from
> various handlers and deletes them according to the cleaning request.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)