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

Zhe Zhang commented on HDFS-7889:
---------------------------------

Thanks Bo for the update and Vinay for the thorough review!

I agree that we should keep {{newStreamForCreate}} in {{DFSOutputStream}} to 
minimize code change at this stage. 

I agree with Vinay that letting a super class create an instance of its 
subclass is a good pattern in general. However, our current  
{{DFSOutputStream}} class only represents contiguous input streams. On the 
conceptual level it is not the parent of {{DFSStripedInputStream}}. Ideally, in 
the future we should have a common super class for contiguous and striped input 
streams. At that time that super class should contain the 
{{newStreamForCreate}} logic. We can do this refactor as a follow-on.

Will post my review of 007 patch soon.

> Subclass DFSOutputStream to support writing striping layout files
> -----------------------------------------------------------------
>
>                 Key: HDFS-7889
>                 URL: https://issues.apache.org/jira/browse/HDFS-7889
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Li Bo
>            Assignee: Li Bo
>         Attachments: HDFS-7889-001.patch, HDFS-7889-002.patch, 
> HDFS-7889-003.patch, HDFS-7889-004.patch, HDFS-7889-005.patch, 
> HDFS-7889-006.patch, HDFS-7889-007.patch
>
>
> After HDFS-7888, we can subclass  {{DFSOutputStream}} to support writing 
> striping layout files. 



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

Reply via email to