[ https://issues.apache.org/jira/browse/HIVE-27019?focusedWorklogId=847739&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-847739 ]
ASF GitHub Bot logged work on HIVE-27019: ----------------------------------------- Author: ASF GitHub Bot Created on: 27/Feb/23 07:58 Start Date: 27/Feb/23 07:58 Worklog Time Spent: 10m Work Description: deniskuzZ commented on code in PR #4032: URL: https://github.com/apache/hive/pull/4032#discussion_r1118389829 ########## ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CleaningRequest.java: ########## @@ -0,0 +1,196 @@ +/* + * 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; + +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + +import java.util.List; + +/** + * A class which specifies the required information for cleanup. + * Objects from this class are passed to FSRemover for cleanup. + */ +public class CleaningRequest { + public enum RequestType { + COMPACTION, + } + private final RequestType type; + private final String location; + private final List<Path> obsoleteDirs; + private final boolean purge; + private final FileSystem fs; + private final String runAs; + private final String cleanerMetric; + private final String dbName; + private final String tableName; + private final String partitionName; + private final boolean dropPartition; + private final String fullPartitionName; + + public CleaningRequest(CleaningRequestBuilder<? extends CleaningRequestBuilder<?>> builder) { + this.type = builder.type; + this.location = builder.location; + this.obsoleteDirs = builder.obsoleteDirs; + this.purge = builder.purge; + this.fs = builder.fs; + this.runAs = builder.runAs; + this.cleanerMetric = builder.cleanerMetric; + this.dbName = builder.dbName; Review Comment: I don't see CompactionCleaningRequest anymore. but i think your comment is still valid Issue Time Tracking ------------------- Worklog Id: (was: 847739) Time Spent: 11h (was: 10h 50m) > 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: 11h > 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)