[
https://issues.apache.org/jira/browse/HIVE-24275?focusedWorklogId=503213&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-503213
]
ASF GitHub Bot logged work on HIVE-24275:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Oct/20 14:22
Start Date: 21/Oct/20 14:22
Worklog Time Spent: 10m
Work Description: pvargacl commented on a change in pull request #1583:
URL: https://github.com/apache/hive/pull/1583#discussion_r509330534
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
##########
@@ -272,4 +302,22 @@ private void removeFiles(String location, ValidWriteIdList
writeIdList, Compacti
fs.delete(dead, true);
}
}
+
+ /**
+ * Check if user configured retention time for the cleanup of obsolete
directories/files for the table
+ * has passed or not
+ *
+ * @param ci CompactionInfo
+ * @return True, if retention time has passed and it is ok to clean, else
false
+ */
+ public boolean isReadyToCleanWithRetentionPolicy(CompactionInfo ci) {
Review comment:
This whole thing could be added to the findReadyToClean's sql query
where clause. It could use the TxnDbUtil.getEpochFn so there would be no need
for new fields in CompactionInfo
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 503213)
Time Spent: 1h (was: 50m)
> Configurations to delay the deletion of obsolete files by the Cleaner
> ---------------------------------------------------------------------
>
> Key: HIVE-24275
> URL: https://issues.apache.org/jira/browse/HIVE-24275
> Project: Hive
> Issue Type: New Feature
> Reporter: Kishen Das
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Whenever compaction happens, the cleaner immediately deletes older obsolete
> files. In certain cases it would be beneficial to retain these for certain
> period. For example : if you are serving the file metadata from cache and
> don't want to invalidate the cache during compaction because of performance
> reasons.
> For this purpose we should introduce a configuration
> hive.compactor.delayed.cleanup.enabled, which if enabled will delay the
> cleaning up obsolete files. There should be a separate configuration
> CLEANER_RETENTION_TIME to specify the duration till which we should retain
> these older obsolete files.
> It might be beneficial to have one more configuration to decide whether to
> retain files involved in an aborted transaction
> hive.compactor.aborted.txn.delayed.cleanup.enabled .
--
This message was sent by Atlassian Jira
(v8.3.4#803005)