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

John Zhuge commented on HDFS-9522:
----------------------------------

Thanks, [~drankye], it is not minor cleanup :) I will remove the changes 
related to HDFS-9573 from the patch.

The patch should have the following benefits:
* Encapsulation: all related code are in one place, e.g., everything about 
rename entry is in class RenameEntry.
* Extensibility: e.g, easy to add more fields to ModifyEntry without affecting 
other types.
* Neat implementation of inverse entry.
* Remove code like "switch (DiffType)" or "if (entry.getType() == 
DiffType.XXXX)" scattered everywhere.

Stay tuned for another patch.

> Cleanup o.a.h.hdfs.protocol.SnapshotDiffReport
> ----------------------------------------------
>
>                 Key: HDFS-9522
>                 URL: https://issues.apache.org/jira/browse/HDFS-9522
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>            Priority: Minor
>         Attachments: HDFS-9522-001.patch, HDFS-9522-002.patch, 
> HDFS-9522-003.patch, HDFS-9522-004.patch, HDFS-9522-005.patch, 
> HDFS-9522-006.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The current DiffReportEntry is a C-style tagged union-like data structure.  
> Recommend subclass hierarchy as in Java idiom.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to