[ https://issues.apache.org/jira/browse/HADOOP-8110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13403465#comment-13403465 ]
Jason Lowe commented on HADOOP-8110: ------------------------------------ Finally tracked this down. The clue is in the the expunge error message, as Current should always be directly under .Trash, but in this case it's under one of the snapshot directories. Here's the sequence of events that causes it to happen: # File is deleted, placing it under .Trash/Current (created if necessary) # Trash is expunged, creating a new checkpoint that renames Current to the checkpoint name # Another file is deleted, which creates .Trash/Current # Trash is expunged *in the same wall-clock second* as the previous expunge, inadvertently renaming Current to an existing directory and placing it *under* the checkpoint name # Another file is deleted, which creates .Trash/Current # Trash is expunged again *in the same wall-clock second* as the first expunge, trying to rename Current to an existing directory. Current already exists under the target directory and the lower-level fs rename fails. When it falls back to a copy, the checkDest() fails with the "Target is a directory" error. So this explains why it's only failing sometimes. The machine has to be fast enough so the test gets through three expunges in the same second. > TestViewFsTrash occasionally fails > ---------------------------------- > > Key: HADOOP-8110 > URL: https://issues.apache.org/jira/browse/HADOOP-8110 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 0.23.3, 0.24.0 > Reporter: Tsz Wo (Nicholas), SZE > > {noformat} > junit.framework.AssertionFailedError: -expunge failed expected:<0> but was:<1> > at junit.framework.Assert.fail(Assert.java:47) > at junit.framework.Assert.failNotEquals(Assert.java:283) > at junit.framework.Assert.assertEquals(Assert.java:64) > at junit.framework.Assert.assertEquals(Assert.java:195) > at org.apache.hadoop.fs.TestTrash.trashShell(TestTrash.java:322) > at > org.apache.hadoop.fs.viewfs.TestViewFsTrash.testTrash(TestViewFsTrash.java:73) > ... > {noformat} > There are quite a few TestViewFsTrash failures recently. E.g. [build #624 > for > trunk|https://builds.apache.org/job/PreCommit-HADOOP-Build/624//testReport/org.apache.hadoop.fs.viewfs/TestViewFsTrash/testTrash/] > and [build #2 for > 0.23-PB|https://builds.apache.org/view/G-L/view/Hadoop/job/Hadoop-Common-0.23-PB-Build/2/testReport/junit/org.apache.hadoop.fs.viewfs/TestViewFsTrash/testTrash/]. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira