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

Kuhu Shukla commented on HADOOP-14267:
--------------------------------------

[~liuml07],
bq. For the existing problems for downstream in using the DistCpOptions as Jing 
proposed, I'll create another jira for tracking this. That should go to 
branch-2 and be backwards-compatible.
Do we have any JIRAs or road map to track this since having a somewhat 
compatible change will save downstream projects (which can be many more than 
Oozie or Falcon) from breaking? Appreciate any and all comments on this.

> Make DistCpOptions class immutable
> ----------------------------------
>
>                 Key: HADOOP-14267
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14267
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: tools/distcp
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>            Priority: Major
>             Fix For: 3.0.0-alpha4
>
>         Attachments: HDFS-10533.000.patch, HDFS-10533.000.patch, 
> HDFS-10533.001.patch, HDFS-10533.002.patch, HDFS-10533.003.patch, 
> HDFS-10533.004.patch, HDFS-10533.005.patch, HDFS-10533.006.patch, 
> HDFS-10533.007.patch, HDFS-10533.008.patch, HDFS-10533.009.patch, 
> HDFS-10533.010.patch, HDFS-10533.011.patch, HDFS-10533.012.patch
>
>
> Currently the {{DistCpOptions}} class encapsulates all DistCp options, which 
> may be set from command-line (via the {{OptionsParser}}) or may be set 
> manually (eg construct an instance and call setters). As there are multiple 
> option fields and more (e.g. [HDFS-9868], [HDFS-10314]) to add, validating 
> them can be cumbersome. Ideally, the {{DistCpOptions}} object should be 
> immutable. The benefits are:
> # {{DistCpOptions}} is simple and easier to use and share, plus it scales well
> # validation is automatic, e.g. manually constructed {{DistCpOptions}} gets 
> validated before usage
> # validation error message is well-defined which does not depend on the order 
> of setters
> This jira is to track the effort of making the {{DistCpOptions}} immutable by 
> using a Builder pattern for creation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to