[ 
https://issues.apache.org/jira/browse/HADOOP-1272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490286
 ] 

Andrzej Bialecki  commented on HADOOP-1272:
-------------------------------------------

Some renaming will be necessary, though, to avoid meaningless and conflicting 
names - e.g. SequenceFile.Reader -> SequenceFileReader, MapFile.Reader -> 
MapFileReader. Other inner classes with unique names could be extracted as is. 
There are some cases of doubly nested classes, e.g. 
FSNamesystem.ReplicationTargetChooser.NotEnoughReplicasException, 
SequenceFile.Sorter.MergeQueue, etc ... In such cases I propose to extract only 
the first level, to avoid exploding the parent package namespace with classes 
that are unusable outside their current parent class.

For that matter, perhaps in more complex cases, such as SequenceFile / MapFile 
/ ArrayFile and associated sorters, or the family of Writable classes, it would 
be better to create new sub-packages? This is how it's done with 
compression-related classes.

> Extract InnerClasses from FSNamesystem into separate classes
> ------------------------------------------------------------
>
>                 Key: HADOOP-1272
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1272
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>         Attachments: innerclasses.patch
>
>
> This will make the code cleaner. Also, it leads itself to a cleaner and 
> easily understandable finer-grain locking model.

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