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

Allen Wittenauer commented on HADOOP-10115:
-------------------------------------------

Keeping in mind I'm not a Maven expert by any stretch, at what point should 
dist-layout-stitching.sh just be something in dev-support/ rather than having a 
long string of shell inside the pom.xml file?

Running the entire shell code into shellcheck, we get quite a few warnings and 
errors.  It'd be good to get these fixed. There are lots of SC2086 errors all 
over the place (unquoted variables which contain paths that will break if those 
paths have IFS, etc, metachars); too many to list here.  Ignoring those, the 
big ones that stick out to me:

{code}
In /tmp/2 line 16:
                        local count=`find $dir -iname $file|wc -l`
                                    ^-- SC2006: Use $(..) instead of deprecated 
`..`

In /tmp/2 line 25:
                          if [[ $srcName != *.jar ]] || [ `findFileInDir 
$srcName` -eq "0" ]; then
                                                          ^-- SC2046: Quote 
this to prevent word splitting.
                                                          ^-- SC2006: Use $(..) 
instead of deprecated `..`

In /tmp/2 line 31:
                          for child in `ls $src`; do
                                       ^-- SC2045: Iterating over ls output is 
fragile. Use globs.
                                       ^-- SC2006: Use $(..) instead of 
deprecated `..`

In /tmp/2 line 48:
                          for child in `ls $src`; do
                                       ^-- SC2045: Iterating over ls output is 
fragile. Use globs.
                                       ^-- SC2006: Use $(..) instead of 
deprecated `..`

{code}

Bonus points for switching all the [/] to [[/]] pairs.

Actually running the existent patch throws an error:

{code}
     [exec] ./dist-layout-stitching.sh: line 81: //: is a directory
{code}

> Exclude duplicate jars in hadoop package under different component's lib
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-10115
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10115
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 2.2.0
>            Reporter: Vinayakumar B
>            Assignee: Vinayakumar B
>         Attachments: HADOOP-10115-004.patch, HADOOP-10115.patch, 
> HADOOP-10115.patch, HADOOP-10115.patch
>
>
> In the hadoop package distribution there are more than 90% of the jars are 
> duplicated in multiple places.
> For Ex:
> almost all jars in share/hadoop/hdfs/lib are already there in 
> share/hadoop/common/lib
> Same case for all other lib in share directory.
> Anyway for all the daemon processes all directories are added to classpath.
> So to reduce the package distribution size and the classpath overhead, remove 
> the duplicate jars from the distribution.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to