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

SammiChen commented on HDFS-11170:
----------------------------------

Hi [~andrew.wang], as we have disuccsed in HDFS-10996, our initial goal of this 
task is to make it easy for user to pass parameter to create function, and also 
make it easy for feature developer to introduce more new parameters. After some 
investigation, I find {{ErasureCodingPolicy}} parameter type is only restricted 
in {{DistributedFileSystem}} scope. It can't go into {{filesystem}}. Other than 
{{ErasureCodingPolicy}} parameter, {{InetSocketAddress[] favoredNodes}} create 
parameter is also unique to {{DistributedFileSystem}}. I guess for other file 
system class, such as S3, or future cloud file system, it may also has its own 
specific create parameters.  My point here is it seems there is no way to have 
a general create builder including both create parameters in {{FileSystem}} 
class and parameters in {{DistributedFileSystem}}class. There has to be a 
create builder for each class, which I think is not an elegant design. My 
prefer is we only use builder for the newly added create function in 
HDFS-10996. Any suggestion? 

> Add create API in filesystem public class to support assign parameter through 
> builder
> -------------------------------------------------------------------------------------
>
>                 Key: HDFS-11170
>                 URL: https://issues.apache.org/jira/browse/HDFS-11170
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: SammiChen
>            Assignee: SammiChen
>
> FileSystem class supports multiple create functions to help user create file. 
> Some create functions has many parameters, it's hard for user to exactly 
> remember these parameters and their orders. This task is to add builder  
> based create functions to help user more easily create file. 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to