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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to