[ https://issues.apache.org/jira/browse/HIVE-27020?focusedWorklogId=854171&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-854171 ]
ASF GitHub Bot logged work on HIVE-27020: ----------------------------------------- Author: ASF GitHub Bot Created on: 31/Mar/23 12:31 Start Date: 31/Mar/23 12:31 Worklog Time Spent: 10m Work Description: SourabhBadhya commented on code in PR #4091: URL: https://github.com/apache/hive/pull/4091#discussion_r1154418137 ########## ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/handler/AcidTxnCleaner.java: ########## @@ -0,0 +1,125 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.txn.compactor.handler; + +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hive.common.ValidReadTxnList; +import org.apache.hadoop.hive.common.ValidReaderWriteIdList; +import org.apache.hadoop.hive.common.ValidTxnList; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsRequest; +import org.apache.hadoop.hive.metastore.api.GetValidWriteIdsResponse; +import org.apache.hadoop.hive.metastore.api.MetaException; +import org.apache.hadoop.hive.metastore.api.NoSuchTxnException; +import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.metastore.metrics.AcidMetricService; +import org.apache.hadoop.hive.metastore.txn.AcidTxnInfo; +import org.apache.hadoop.hive.metastore.txn.TxnCommonUtils; +import org.apache.hadoop.hive.metastore.txn.TxnStore; +import org.apache.hadoop.hive.ql.io.AcidDirectory; +import org.apache.hadoop.hive.ql.io.AcidUtils; +import org.apache.hadoop.hive.ql.txn.compactor.CleanupRequest.CleanupRequestBuilder; +import org.apache.hadoop.hive.ql.txn.compactor.CompactorUtil; +import org.apache.hadoop.hive.ql.txn.compactor.FSRemover; +import org.apache.hadoop.hive.ql.txn.compactor.MetadataCache; +import org.apache.hive.common.util.Ref; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.BitSet; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import static org.apache.commons.collections.ListUtils.subtract; + +/** + * An abstract class extending TaskHandler which contains the common methods from + * CompactionCleaner and AbortedTxnCleaner. + */ +abstract class AcidTxnCleaner extends TaskHandler { Review Comment: Removed AcidTxnCleaner and pushed all methods to TaskHandler. Done. Issue Time Tracking ------------------- Worklog Id: (was: 854171) Time Spent: 4h 50m (was: 4h 40m) > Implement a separate handler to handle aborted transaction cleanup > ------------------------------------------------------------------ > > Key: HIVE-27020 > URL: https://issues.apache.org/jira/browse/HIVE-27020 > Project: Hive > Issue Type: Sub-task > Reporter: Sourabh Badhya > Assignee: Sourabh Badhya > Priority: Major > Labels: pull-request-available > Time Spent: 4h 50m > Remaining Estimate: 0h > > As described in the parent task, once the cleaner is separated into different > entities, implement a separate handler which can create requests for aborted > transactions cleanup. This would move the aborted transaction cleanup > exclusively to the cleaner. -- This message was sent by Atlassian Jira (v8.20.10#820010)