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. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org