Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Incompatible change, Reviewed
-
DistCpOptions has been changed to be constructed with a Builder pattern. This potentially affects applications that invoke DistCp with the Java API.
Description
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.
Attachments
Attachments
Issue Links
- blocks
-
FALCON-2029 HDFS-8828 requires Falcon to update Snapshot based mirroring extension
- Open
- breaks
-
HBASE-18896 Work around incompatible change to DistCpOptions for hadoop-3
- Resolved
-
HADOOP-15200 Missing DistCpOptions constructor breaks downstream DistCp projects in 3.0
- Patch Available
- relates to
-
HDFS-10556 DistCpOptions should be validated automatically
- Resolved