HADOOP-16294: Enable access to input options by DistCp subclasses.

Adding a protected-scope getter for the DistCpOptions, so that a subclass does
not need to save its own copy of the inputOptions supplied to its constructor,
if it wishes to override the createInputFileListing method with logic similar
to the original implementation, i.e. calling CopyListing#buildListing with a path and input options.

Author:    Andrew Olson
(cherry picked from commit c15b3bca86)
This commit is contained in:
Andrew Olson 2019-05-16 16:11:12 +02:00 committed by Steve Loughran
parent 6eb48542f1
commit 55603529d0
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
1 changed files with 9 additions and 0 deletions

View File

@ -416,6 +416,15 @@ public class DistCp extends Configured implements Tool {
return metaFolderPath;
}
/**
* Returns the context.
*
* @return the context
*/
protected DistCpContext getContext() {
return context;
}
/**
* Main function of the DistCp program. Parses the input arguments (via OptionsParser),
* and invokes the DistCp::run() method, via the ToolRunner.