[
https://issues.apache.org/jira/browse/HBASE-6707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469194#comment-13469194
]
Jesse Yates commented on HBASE-6707:
------------------------------------
bq. Why the addition of 3 above ?
So it checks each of the directories on the way down - tablename/region/family
- hence the plus three.
The way CleanerChore works is that it looks at the main directory, and then if
it has files under it, attempts to see if those files are deleteable. If they
aren't deletable, it skips checking the directory and continues on to the next
directory to check. If all the files are deletable, then if checks to see if
the directory is deletable.
bq. The above change deviates from original assumption. Please explain why a
directory can be deleted regardless of whether it has files under it.
Therefore, we can always consider directories deletable because there is
nothing special about a directory, but only the files under the directory.
Perhaps that was a flaw in the design, but we should file another ticket to
change that behavior such that we only check for files and delete directories
when there are no files for that directory.
Further note, for the original quote, that we need only have +3 for the
non-archived table's directories, but not an extra +3 (which would make a total
of +6) for the archived table because we don't attempt to delete the directory
containing hfiles that are retained.
> TEST
> org.apache.hadoop.hbase.backup.example.TestZooKeeperTableArchiveClient.testMultipleTables
> flaps
> ----------------------------------------------------------------------------------------------------
>
> Key: HBASE-6707
> URL: https://issues.apache.org/jira/browse/HBASE-6707
> Project: HBase
> Issue Type: Bug
> Components: test
> Reporter: Sameer Vaishampayan
> Assignee: Jesse Yates
> Priority: Critical
> Fix For: 0.96.0
>
> Attachments: hbase-6707-v0.patch, hbase-6707-v1.patch,
> hbase-6707-v2.patch, hbase-6707-v3.patch, hbase-6707-v4-addendum.patch,
> hbase-6707-v4.patch
>
>
> https://builds.apache.org/job/HBase-TRUNK/3293/
> Error Message
> Archived HFiles
> (hdfs://localhost:59986/user/jenkins/hbase/.archive/otherTable/01ced3b55d7220a9c460273a4a57b198/fam)
> should have gotten deleted, but didn't, remaining
> files:[hdfs://localhost:59986/user/jenkins/hbase/.archive/otherTable/01ced3b55d7220a9c460273a4a57b198/fam/fc872572a1f5443eb55b6e2567cfeb1c]
> Stacktrace
> java.lang.AssertionError: Archived HFiles
> (hdfs://localhost:59986/user/jenkins/hbase/.archive/otherTable/01ced3b55d7220a9c460273a4a57b198/fam)
> should have gotten deleted, but didn't, remaining
> files:[hdfs://localhost:59986/user/jenkins/hbase/.archive/otherTable/01ced3b55d7220a9c460273a4a57b198/fam/fc872572a1f5443eb55b6e2567cfeb1c]
> at org.junit.Assert.fail(Assert.java:93)
> at org.junit.Assert.assertTrue(Assert.java:43)
> at org.junit.Assert.assertNull(Assert.java:551)
> at
> org.apache.hadoop.hbase.backup.example.TestZooKeeperTableArchiveClient.testMultipleTables(TestZooKeeperTableArchiveClient.java:291)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira