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

Ivan Kelly commented on HDFS-2003:
----------------------------------

I've uploaded a new patch which reduces the number of objects as suggested. I 
didn't put it in the FSEditLogOpCodes enum though as I didn't want to create a 
circular dependency there. I've moved the Reader to the end of FSEditLogOp. The 
reason I didn't put this into a new files is simply because I wanted to limit 
the number of files in the package. 

I've also changed the implementation so that an EOF in the middle of a 
transaction gets propogated as an error. Not as a EOFException though, but as a 
IOException. 

> Separate FSEditLog reading logic from editLog memory state building logic
> -------------------------------------------------------------------------
>
>                 Key: HDFS-2003
>                 URL: https://issues.apache.org/jira/browse/HDFS-2003
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: Edit log branch (HDFS-1073)
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: Edit log branch (HDFS-1073)
>
>         Attachments: HDFS-2003.diff, HDFS-2003.diff, HDFS-2003.diff, 
> HDFS-2003.diff
>
>
> Currently FSEditLogLoader has code for reading from an InputStream 
> interleaved with code which updates the FSNameSystem and FSDirectory. This 
> makes it difficult to read an edit log without having a whole load of other 
> object initialised, which is problematic if you want to do things like count 
> how many transactions are in a file etc. 
> This patch separates the reading of the stream and the building of the memory 
> state. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to