[ 
https://issues.apache.org/jira/browse/HDFS-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sanjay Radia updated HDFS-1108:
-------------------------------

    Attachment: hdfs-1108-hadoop-1.patch

Port of patch for Hadoop-1.

Note TestPersistBlocks() has 2 bugs in trunk.
The original patch (hdfs-1108.txt) called stream.flush() instead of 
stream.hflush(). Flush() was correct since hflush() already forces the block 
allocation to be sync'ed to the log.

The patch for ha-branch (hdfs-1108- habranch.txt) changed this as it introduced 
additional tests. Hence  the test is not really testing the problem that this 
jira fixes.


In my port to hadoop-1, I ran TestPersistBlock without the fix to FSNamesystem 
and tried both sync(ie hflush) and flush(). The tests passed with sync() but 
not with flush(). 
Note both  testRestartDfs testRestartWithPartialBlockHflushed  should 
call flush() and not sync() after writing DATA_BEFORE_RESTART.

I will file a jira to fix this in trunk.
                
> Log newly allocated blocks
> --------------------------
>
>                 Key: HDFS-1108
>                 URL: https://issues.apache.org/jira/browse/HDFS-1108
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, name-node
>            Reporter: dhruba borthakur
>            Assignee: Todd Lipcon
>             Fix For: HA branch (HDFS-1623)
>
>         Attachments: HDFS-1108.patch, hdfs-1108-habranch.txt, 
> hdfs-1108-habranch.txt, hdfs-1108-habranch.txt, hdfs-1108-habranch.txt, 
> hdfs-1108-habranch.txt, hdfs-1108-hadoop-1.patch, hdfs-1108.txt
>
>
> The current HDFS design says that newly allocated blocks for a file are not 
> persisted in the NN transaction log when the block is allocated. Instead, a 
> hflush() or a close() on the file persists the blocks into the transaction 
> log. It would be nice if we can immediately persist newly allocated blocks 
> (as soon as they are allocated) for specific files.

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

        

Reply via email to