[
https://issues.apache.org/jira/browse/HADOOP-11244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14189857#comment-14189857
]
Steve Loughran commented on HADOOP-11244:
-----------------------------------------
yes, something seems awry, though why it ever passed now misses me.
the test is actually intended to stress something that proved pretty variable
across systems: what happens when you rename a file that is actively being
written to, with some expectation that things may happen.
the logic was meant to be
{code}
outputstream.write............
Path renamed = new Path(testPath, "renamed");
rename(target, renamed); <----- need rename here
outputStream.close();
{code}
There's two outcomes I'd expect
# data ends up on new path
# data ends up on old path
with the code in there you will automatically get outcome #2, but the test is
for #1. Now I'm confused.
I do not have any free time to look at this right now. I have pushed up to
github the branch with the full history:
[[https://github.com/steveloughran/hadoop-trunk/tree/old/HADOOP-9361-filesystem-contract]]
if something got dropped it should be in the history ... though the file got
renamed near the end so it's not so easy to use the github history to track down
> The HCFS contract test testRenameFileBeingAppended doesn't do a rename
> ----------------------------------------------------------------------
>
> Key: HADOOP-11244
> URL: https://issues.apache.org/jira/browse/HADOOP-11244
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Noah Watkins
>
> The test AbstractContractAppendTest::testRenameFileBeingAppended appears to
> assert the behavior of renaming a file opened for writing. However, the
> assertion "assertPathExists("renamed destination file does not exist",
> renamed);" fails because it appears that the file "renamed" is never created
> (ostensibly it should be the "target" file that has been renamed).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)