[ 
https://issues.apache.org/jira/browse/HADOOP-14394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lei (Eddy) Xu updated HADOOP-14394:
-----------------------------------
    Attachment: HADOOP-14394.02.patch

Thanks for the reviews, [~andrew.wang]

bq. Why did we take the defaults out of the getters and put them into the 
constructor? This increases coupling with the parent class.

The reason behind this is that I feel using {{null}} to check whether a field 
is set is little error-prone, and can lead NullPointerException in the future. 
And since this patch is also against branch-2.9, which does not allow to use 
JDK8 {{Optional}},  I chose to set the default values in the constructor 
instead. 

{code}
fs.createFile(path).getPermission().
{code} 

bq. setOptions comments

Ok, I removed {{setOptions}} related code from this patch, and will file a new 
JIRA for it.

Also addressed all other comments. 

Please take another look, thanks! 

Also ping [~steve_l] and [~stack] for more inputs. Thanks!

> Provide Builder pattern for DistributedFileSystem.create
> --------------------------------------------------------
>
>                 Key: HADOOP-14394
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14394
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs
>    Affects Versions: 2.9.0
>            Reporter: Lei (Eddy) Xu
>            Assignee: Lei (Eddy) Xu
>         Attachments: HADOOP-14394.00.patch, HADOOP-14394.01.patch, 
> HADOOP-14394.02.patch
>
>
> This JIRA continues to refine the {{FSOutputStreamBuilder}} interface 
> introduced in HDFS-11170. 
> It should also provide a spec for the Builder API.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to