hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Wittenauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12249) pull argument parsing into a function
Date Thu, 30 Jul 2015 21:49:04 GMT

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

Allen Wittenauer commented on HADOOP-12249:

bq. Is there a compatibility reason we need MYNAME to exist rather than e.g. using BASH_SOURCE

The $\{BASH_SOURCE-$0\} "math" is needed in a variety of places on a *per executable* basis.
  One of the big ways it is used is to determine where the libexec directory is located at
if the user doesn't have any env vars set.  So it's shoved in a variable for convenience.
 In older scripts, it's generally used as "$this" 

> pull argument parsing into a function
> -------------------------------------
>                 Key: HADOOP-12249
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12249
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 3.0.0
>            Reporter: Allen Wittenauer
>            Assignee: Allen Wittenauer
>              Labels: scripts, shell
>         Attachments: HADOOP-12249.00.patch, HADOOP-12294.01.patch
> In order to enable significantly better unit testing as well as enhanced functionality,
large portions of *-config.sh should be pulled into functions.  See first comment for more.

This message was sent by Atlassian JIRA

View raw message