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

Konstantin Shvachko commented on HDFS-1473:
-------------------------------------------

Sorry for late response. Was just looking at it on Sunday when Eli committed 
it, so I stopped. Now looking at it in trunk I feel it needs more work, mostly 
because I see lots of unnecessary public methods and classes.
# FSImageCompression should not have public methods except for toString().
# FSImageFormat should not be abstract and should not have anything public.
# FSImageSerialization should not be abstract. It does not have any abstract 
methods. I understand we will get rid of other public qualifiers once OIV moves 
inside namenode package. Could we please state it in the beginning of the class.
# FSImageFormat.Loader and FSImageFormat.Writer seem like a mismatch. Loader 
rhythms with saver, reader with writer. Just a teerminology issue. We used to 
load and save image. Now we load and write it. I'd stay with the traditional 
terms.
# FSImageSerialization.TL_DATA is the new name for former FSImage.FILE_PERM. I 
agree FILE_PERM is not the best choice, but TL_DATA lacks any meaning 
attributed to the object. And if it once will become a non-thread local object 
then the name will be completely irrelevant. I'd go with the original name and 
rename in a separate issue. In general, refactoring patches should avoid 
renaming.

> Refactor storage management into separate classes than fsimage file 
> reading/writing
> -----------------------------------------------------------------------------------
>
>                 Key: HDFS-1473
>                 URL: https://issues.apache.org/jira/browse/HDFS-1473
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: 0.22.0, 0.23.0
>
>         Attachments: hdfs-1473-prelim.txt, hdfs-1473.txt, hdfs-1473.txt, 
> hdfs-1473.txt
>
>
> Currently the FSImage class is responsible both for storage management (eg 
> moving around files, tracking file names, the VERSION file, etc) as well as 
> for the actual serialization and deserialization of the "fsimage" file within 
> the storage directory.
> I'd like to refactor the loading and saving code into new classes. This will 
> make testing easier and also make the major changes in HDFS-1073 easier to 
> understand.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to