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

Hudson commented on HDFS-4677:
------------------------------

Integrated in Hadoop-trunk-Commit #3888 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/3888/])
    HDFS-4677. Editlog should support synchronous writes. Contributed by Ivan 
Mitic. (Revision 1491096)

     Result = SUCCESS
ivanmi : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1491096
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JNStorage.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNode.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FileJournalManager.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/BinaryEditsVisitor.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournal.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogFileOutputStream.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionManager.java
* 
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java

                
> Editlog should support synchronous writes
> -----------------------------------------
>
>                 Key: HDFS-4677
>                 URL: https://issues.apache.org/jira/browse/HDFS-4677
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 1-win
>            Reporter: Ivan Mitic
>            Assignee: Ivan Mitic
>         Attachments: HDFS-4677.2.patch, HDFS-4677.3.patch, HDFS-4677.3.patch, 
> HDFS-4677.branch-1-win.patch, HDFS-4677.patch
>
>
> In the current implementation, NameNode editlog performs syncs to the 
> persistent storage using the {{FileChannel#force}} Java APIs. This API is 
> documented to be slower compared to an alternative where {{RandomAccessFile}} 
> is opened with "rws" flags (synchronous writes). 
> We instrumented {{FileChannel#force}} on Windows and it some 
> software/hardware configurations it can perform significantly slower than the 
> “rws” alternative.
> In terms of the Windows APIs, FileChannel#force internally calls 
> [FlushFileBuffers|http://msdn.microsoft.com/en-us/library/windows/desktop/aa364439(v=vs.85).aspx]
>  while RandomAccessFile (“rws”) opens the file with the 
> [FILE_FLAG_WRITE_THROUGH flag|http://support.microsoft.com/kb/99794]. 
> With this Jira I'd like to introduce a flag that provide means to configure 
> NameNode to use synchronous writes. There is a catch though, the behavior of 
> the "rws" flags is platform and hardware specific and might not provide the 
> same level of guarantees as {{FileChannel#force}} w.r.t. flushing the on-disk 
> cache. This is an expert level setting, and it should be documented as such.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to