hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-744) Support hsync in HDFS
Date Fri, 18 May 2012 00:25:04 GMT

    [ https://issues.apache.org/jira/browse/HDFS-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278444#comment-13278444

Tsz Wo (Nicholas), SZE commented on HDFS-744:

Thanks a lot, Lars!  The patch looks good.  Some comments:

- Let's name the new CreateFlag as SYNC_BLOCK instead of FORCE.  POSIX uses SYNC as you mentioned
but POSIX SYNC means syncing every write.

- DFSOutputStream.hsync(),
-* It should call flush(true).  It is better to sync the current block then not syncing at
-* Need to update the javadoc to say that it only sync the current block.

- Rename flush(force) to flushOrSync(isSync) in BlockReceiver and DFSOutputStream.  Please
also update the javadoc.

- We do not use tabs in Hadoop.  Indentation should use two spaces.

- Please add some new tests.  It is not easy to test whether sync actually works but at least
add some new test to call hsync().  See TestFileAppend and TestFileAppend[234] to get some
> Support hsync in HDFS
> ---------------------
>                 Key: HDFS-744
>                 URL: https://issues.apache.org/jira/browse/HDFS-744
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: data-node, hdfs client
>            Reporter: Hairong Kuang
>            Assignee: Lars Hofhansl
>         Attachments: HDFS-744-trunk-v2.patch, HDFS-744-trunk-v3.patch, HDFS-744-trunk-v4.patch,
HDFS-744-trunk.patch, hdfs-744-v2.txt, hdfs-744-v3.txt, hdfs-744.txt
> HDFS-731 implements hsync by default as hflush. As descriibed in HADOOP-6313, the real
expected semantics should be "flushes out to all replicas and all replicas have done posix
fsync equivalent - ie the OS has flushed it to the disk device (but the disk may have it in
its cache)." This jira aims to implement the expected behaviour.

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


View raw message