[ 
https://issues.apache.org/jira/browse/HADOOP-11244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188783#comment-14188783
 ] 

jay vyas commented on HADOOP-11244:
-----------------------------------

After looking closely, i think it might not be a bug.  lets take a look: 
 
{noformat}
    outputstream.write............
    Path renamed = new Path(testPath, "renamed");
    outputStream.close();
    String listing = ls(testPath);
    //expected: the stream goes to the file that was being renamed, not the 
original path
    assertPathExists("renamed destination file does not exist", renamed);
{noformat} 

I think the issue here, then, is that the stream , when being closed, should 
forward write out to the renamed path. 

Probably if you don't see this behaaviour, then there is a bug in your 
filesystem implementation, which is that it is writing eagerly.  
You can disable this test in via the controller XML file.  I can try to lookup 
the exact xml tag (but the basic idea is here 
https://wiki.apache.org/hadoop/HCFS/Progress) .

 



> 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)

Reply via email to