[
https://issues.apache.org/jira/browse/HADOOP-12930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15199481#comment-15199481
]
Allen Wittenauer edited comment on HADOOP-12930 at 5/5/16 6:14 PM:
-------------------------------------------------------------------
It is extremely desirable to be able to add subcommands to the hadoop, etc,
commands dynamically. There are several reasons to do this:
* Enable local variants of subcommands without worrying about breaking existing
scripts. For example, distcp has historically been replaced with local
versions for various reasons.
* Allows for greater testing capabilities
* Possibility of 3rd party/external-to-hadoop being allowed to add capabilities
and take advantage of the rich shell environment
Enabling this is relatively trivial:
* look for a function defined with a given pattern that matches the subcommand
passed via the CLI
* if that function exists, execute it with passed parameters
* if that function doesn't exist, continue on with our normal processing
In order to accomplish this, a few things need to take place:
* re-arrange the existing commands a bit for legibility/flexibility
* make some shell-local globals to be 'safe' globals that can span past their
borders
* define an API by which 3rd parties may add and override existing commands
* get HADOOP-12857 committed for some pre-work
was (Author: aw):
It is extremely desirable to be able to add subcommands to the hadoop, etc,
commands dynamically. There are several reasons to do this:
* Enable local variants of subcommands without worrying about breaking existing
scripts. For example, distcp has historically been replaced with local
versions for various reasons.
* Allows for greater testing capabilities
* Possibility of 3rd party/external-to-hadoop being allowed to add capabilities
and take advantage of the rich shell environment
In order to accomplish this, a few things need to take place:
* re-arrange the existing commands a bit for legibility/flexibility
* make some shell-local globals to be 'safe' globals that can span past their
borders
* define an API by which 3rd parties may add and override existing commands
* get HADOOP-12857 committed for some pre-work
> [Umbrella] Dynamic subcommands for hadoop shell scripts
> -------------------------------------------------------
>
> Key: HADOOP-12930
> URL: https://issues.apache.org/jira/browse/HADOOP-12930
> Project: Hadoop Common
> Issue Type: Bug
> Components: scripts
> Affects Versions: 3.0.0
> Reporter: Allen Wittenauer
> Assignee: Allen Wittenauer
> Priority: Critical
>
> Umbrella for converting hadoop, hdfs, mapred, and yarn to allow for dynamic
> subcommands. See first comment for more details.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]