jatsakthi commented on a change in pull request #337: HBASE-22578 HFileCleaner
should not delete empty ns/table directories…
URL: https://github.com/apache/hbase/pull/337#discussion_r297919481
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/HFileCleaner.java
##########
@@ -502,7 +507,21 @@ public synchronized void cancel(boolean
mayInterruptIfRunning) {
public void init(Map<String, Object> params) {
if (params != null && params.containsKey(HMaster.MASTER)) {
- this.master = (MasterServices) params.get(HMaster.MASTER);
+ this.master = (HMaster) params.get(HMaster.MASTER);
}
}
+
+ @Override
+ boolean shouldDeleteDirectory(Path dir) {
+ /*
+ * If user scan snapshot feature is enabled(see HBASE-21995), then when
namespace or table
+ * exists, the archive namespace or table directories should not be
deleted because the HDFS
+ * acls are set at these directories; the archive data directory should
not be deleted because
+ * the HDFS acls of global permission is set at this directory.
+ */
+ /*if (userScanSnapshotEnabled) {
Review comment:
This if condition shouldn't be commented. Without it, the added test case
"testCleanArchiveTableDir" fails.
----------------------------------------------------------------
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]
With regards,
Apache Git Services