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

Doug Cutting commented on HADOOP-4868:
--------------------------------------

I would prefer that the included scripts were not directly in the bin/ 
directory, but rather in lib/ or a subdirectory.  The bin/ directory should 
ideally only contain end-user commands.

Also, once we split the projects, we'd like the combination of core & mapred 
and core & hdfs to be as simple as possible.  Copying multiple scripts into 
directories seems fragile.  Ideally we'd have a single shell script to 
bootstrap things and then get everything else from jars on the classpath, since 
we need to combine libraries (core, hdfs, & mapred) together on the classpath 
anyway.

Might it be simpler if the command dispatch were in Java?  We might have a 
CoreCommand, plus MapredCommand and HdfsCommand subclasses.  The bin/hadoop 
script (from core) might, when invoked with 'bin/hadoop foo ...'  run something 
like org.apache.hadoop.foo.FooCommand.  Then we wouldn't need the core.sh, 
mapred.sh and hdfs.sh include scripts.

BTW, a perhaps little-known feature of hadoop is that it bundles the contents 
of bin/ into the jar, so that the jar contains (with a little unpacking) the 
tools needed to use it.  We could continue this after the project splitup, so 
that all that, e.g., all that hdfs should need from a core release is its jar.  
When we build an hdfs release we can unpack bin/hadoop from the core jar.

> Split the hadoop script into 3 parts
> ------------------------------------
>
>                 Key: HADOOP-4868
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4868
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: scripts
>            Reporter: Sharad Agarwal
>            Assignee: Sharad Agarwal
>         Attachments: 4868_v1.patch, 4868_v2.patch
>
>
> We need to split the bin/hadoop into 3 parts for core, mapred and hdfs. This 
> will enable us to distribute the individual scripts with each component.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to