deniskuzZ commented on a change in pull request #3102:
URL: https://github.com/apache/hive/pull/3102#discussion_r833034460
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
##########
@@ -445,10 +445,17 @@ private boolean removeFiles(String location,
ValidWriteIdList writeIdList, Compa
obsoleteDirs = dir.getAbortedDirectories();
}
- if (obsoleteDirs.isEmpty()
- && !hasDataBelowWatermark(dir, fs, path, ci.highestWriteId,
writeIdList.getHighWatermark())) {
- LOG.info(idWatermark(ci) + " nothing to remove below watermark " +
ci.highestWriteId + ", ");
- return true;
+ if (obsoleteDirs.isEmpty()) {
+ conf.set(ValidTxnList.VALID_TXNS_KEY, new ValidReadTxnList().toString());
+
+ AcidDirectory fullDir = AcidUtils.getAcidState(fs, path, conf,
+ new ValidReaderWriteIdList(ci.getFullTableName(), new long[0], new
BitSet(), ci.highestWriteId, Long.MAX_VALUE),
+ Ref.from(false), false, hdfsDirSnapshots);
+
+ if (fullDir.getObsolete().isEmpty()) {
+ LOG.info(idWatermark(ci) + " nothing to remove below watermark " +
ci.highestWriteId + ", ");
+ return true;
+ }
Review comment:
refactored, please take a look.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]