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

Suresh Srinivas commented on HDFS-3510:
---------------------------------------

Finally took some time to review the tests as well. Here are some comments:
# TestNamenodeRecovery
#* Since you have just modified the tests, could you please add some javadoc to 
EditLogTestSetup class. Also please add javadoc to newly added class 
EltsTestOpcodesAfterPadding.
#* you may want to move adding delete operation to a method, to avoid code 
duplication.
#* very minor - if padding length is zero, you may want to just return from 
#padEditLog()
# TestEditlogFileOutputStream
#* Can you please add some javadoc to the class.
#* testRawWrites() - you can move the code that performs setReadyToFlusy(), 
elos.flushAndSync() and length check to a method to avoid repeating the same 
code
#* You do not need try finally. @Before method deleted the file.


                
> Improve FSEditLog pre-allocation
> --------------------------------
>
>                 Key: HDFS-3510
>                 URL: https://issues.apache.org/jira/browse/HDFS-3510
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>             Fix For: 1.0.0, 2.0.1-alpha
>
>         Attachments: HDFS-3510-b1.001.patch, HDFS-3510-b1.002.patch, 
> HDFS-3510.001.patch, HDFS-3510.003.patch, HDFS-3510.004.patch, 
> HDFS-3510.004.patch, HDFS-3510.006.patch, HDFS-3510.007.patch, 
> HDFS-3510.008.patch, HDFS-3510.009.patch, HDFS-3510.010.patch
>
>
> It is good to avoid running out of space in the middle of writing a batch of 
> edits, because when it happens, we often get partial edits at the end of the 
> log.
> Edit log preallocation can solve this problem (see HADOOP-2330 for a full 
> description of edit log preallocation).
> The current pre-allocation code was introduced for performance reasons, not 
> for preventing partial edits.  As a consequence, we sometimes do a write 
> without using pre-allocation.  We should change the pre-allocation code so 
> that it always preallocates at least enough space before writing out the 
> edits.

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