[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-12-04 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HADOOP-14976:
---

+1 lgtm

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
> Attachments: HADOOP-14976.01.patch, HADOOP-14976.02.patch, 
> HADOOP-14976.03.patch, HADOOP-14976.04.patch
>
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-12-04 Thread Chen Liang (JIRA)

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

Chen Liang commented on HADOOP-14976:
-

Thanks [~arpitagarwal] for working on this and [~aw] for the discussion! +1 on 
v004 patch.

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
> Attachments: HADOOP-14976.01.patch, HADOOP-14976.02.patch, 
> HADOOP-14976.03.patch, HADOOP-14976.04.patch
>
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-11-27 Thread Arpit Agarwal (JIRA)

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

Arpit Agarwal commented on HADOOP-14976:


Allen, do you have any comments on the updated patch or the test case? Thanks.

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
> Attachments: HADOOP-14976.01.patch, HADOOP-14976.02.patch, 
> HADOOP-14976.03.patch, HADOOP-14976.04.patch
>
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-11-09 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HADOOP-14976:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 15m 
12s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 2 new or modified test 
files. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  1m 
41s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 17m 
 2s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  7m 
37s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green}  
9m 32s{color} | {color:green} branch has no errors when building and testing 
our client artifacts. {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
20s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  7m 
44s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} shellcheck {color} | {color:green}  1m 
20s{color} | {color:green} There were no new shellcheck issues. {color} |
| {color:green}+1{color} | {color:green} shelldocs {color} | {color:green}  0m  
8s{color} | {color:green} There were no new shelldocs issues. {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green}  
9m 47s{color} | {color:green} patch has no errors when building and testing our 
client artifacts. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
57s{color} | {color:green} hadoop-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m  
9s{color} | {color:green} hadoop-hdfs in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  8m 
14s{color} | {color:green} hadoop-yarn in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
34s{color} | {color:green} hadoop-mapreduce-project in the patch passed. 
{color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
33s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 85m 16s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639 |
| JIRA Issue | HADOOP-14976 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12896926/HADOOP-14976.04.patch 
|
| Optional Tests |  asflicense  mvnsite  unit  shellcheck  shelldocs  |
| uname | Linux 1936a54d67d6 3.13.0-129-generic #178-Ubuntu SMP Fri Aug 11 
12:48:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / a2c150a |
| maven | version: Apache Maven 3.3.9 |
| shellcheck | v0.4.6 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13656/testReport/ |
| Max. process+thread count | 297 (vs. ulimit of 5000) |
| modules | C: hadoop-common-project/hadoop-common 
hadoop-hdfs-project/hadoop-hdfs hadoop-yarn-project/hadoop-yarn 
hadoop-mapreduce-project U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13656/console |
| Powered by | Apache Yetus 0.7.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
> Attachments: HADOOP-14976.01.patch, HADOOP-14976.02.patch, 
> HADOOP-14976.03.patch, 

[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-11-08 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HADOOP-14976:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  
8s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 2 new or modified test 
files. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
19s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 16m 
18s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  6m 
50s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green}  
9m 51s{color} | {color:green} branch has no errors when building and testing 
our client artifacts. {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
20s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  6m 
22s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} shellcheck {color} | {color:green}  1m 
19s{color} | {color:green} There were no new shellcheck issues. {color} |
| {color:green}+1{color} | {color:green} shelldocs {color} | {color:green}  0m  
8s{color} | {color:green} There were no new shelldocs issues. {color} |
| {color:red}-1{color} | {color:red} whitespace {color} | {color:red}  0m  
0s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git 
apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply 
{color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
10m  5s{color} | {color:green} patch has no errors when building and testing 
our client artifacts. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m  
9s{color} | {color:green} hadoop-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m 
58s{color} | {color:green} hadoop-hdfs in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  6m 
41s{color} | {color:green} hadoop-yarn in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
57s{color} | {color:green} hadoop-mapreduce-project in the patch passed. 
{color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
34s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 64m 28s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639 |
| JIRA Issue | HADOOP-14976 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12896783/HADOOP-14976.03.patch 
|
| Optional Tests |  asflicense  mvnsite  unit  shellcheck  shelldocs  |
| uname | Linux 51d74d28516b 3.13.0-123-generic #172-Ubuntu SMP Mon Jun 26 
18:04:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / 49b4c0b |
| maven | version: Apache Maven 3.3.9 |
| shellcheck | v0.4.6 |
| whitespace | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13652/artifact/out/whitespace-eol.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13652/testReport/ |
| Max. process+thread count | 336 (vs. ulimit of 5000) |
| modules | C: hadoop-common-project/hadoop-common 
hadoop-hdfs-project/hadoop-hdfs hadoop-yarn-project/hadoop-yarn 
hadoop-mapreduce-project U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13652/console |
| Powered by | Apache Yetus 0.7.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: 

[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-11-07 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HADOOP-14976:
---

Rather than use hadoop_debug for this, modify envvars to print them out if 
QATESTMODE is set.

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
> Attachments: HADOOP-14976.01.patch, HADOOP-14976.02.patch
>
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-11-03 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HADOOP-14976:


| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
17s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 4 new or modified test 
files. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
20s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 16m 
38s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  7m 
21s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
11m  0s{color} | {color:green} branch has no errors when building and testing 
our client artifacts. {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
22s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  8m 
11s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} shellcheck {color} | {color:green}  1m 
23s{color} | {color:green} There were no new shellcheck issues. {color} |
| {color:green}+1{color} | {color:green} shelldocs {color} | {color:green}  0m  
9s{color} | {color:green} There were no new shelldocs issues. {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
10m 31s{color} | {color:green} patch has no errors when building and testing 
our client artifacts. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m  
7s{color} | {color:green} hadoop-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m  
7s{color} | {color:green} hadoop-hdfs in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  7m 
54s{color} | {color:green} hadoop-yarn in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
32s{color} | {color:green} hadoop-mapreduce-project in the patch passed. 
{color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
36s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 70m 59s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639 |
| JIRA Issue | HADOOP-14976 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12896019/HADOOP-14976.02.patch 
|
| Optional Tests |  asflicense  mvnsite  unit  shellcheck  shelldocs  |
| uname | Linux 6e4f1ab3f48d 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 
14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / 59d78a5 |
| maven | version: Apache Maven 3.3.9 |
| shellcheck | v0.4.6 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13628/testReport/ |
| Max. process+thread count | 329 (vs. ulimit of 5000) |
| modules | C: hadoop-common-project/hadoop-common 
hadoop-hdfs-project/hadoop-hdfs hadoop-yarn-project/hadoop-yarn 
hadoop-mapreduce-project U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13628/console |
| Powered by | Apache Yetus 0.7.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
>Priority: Major
> Attachments: HADOOP-14976.01.patch, HADOOP-14976.02.patch
>
>
> Some 

[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-11-03 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HADOOP-14976:
---

We still need MYNAME="${BASH_SOURCE-$0}".



> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
>Priority: Major
> Attachments: HADOOP-14976.01.patch
>
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-30 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HADOOP-14976:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
15s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red}  0m  
0s{color} | {color:red} The patch doesn't appear to include any new or modified 
tests. Please justify why no new tests are needed for this patch. Also please 
list what manual steps were performed to verify this patch. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
27s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 21m 
41s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 10m  
3s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
11m 56s{color} | {color:green} branch has no errors when building and testing 
our client artifacts. {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
24s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 10m 
25s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} shellcheck {color} | {color:green}  1m 
33s{color} | {color:green} There were no new shellcheck issues. {color} |
| {color:green}+1{color} | {color:green} shelldocs {color} | {color:green}  0m 
13s{color} | {color:green} There were no new shelldocs issues. {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
12m 17s{color} | {color:green} patch has no errors when building and testing 
our client artifacts. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
54s{color} | {color:green} hadoop-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
23s{color} | {color:green} hadoop-hdfs in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  9m 
20s{color} | {color:green} hadoop-yarn in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  3m 
18s{color} | {color:green} hadoop-mapreduce-project in the patch passed. 
{color} |
| {color:red}-1{color} | {color:red} asflicense {color} | {color:red}  0m 
48s{color} | {color:red} The patch generated 3 ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 87m 30s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639 |
| JIRA Issue | HADOOP-14976 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12894784/HADOOP-14976.01.patch 
|
| Optional Tests |  asflicense  mvnsite  unit  shellcheck  shelldocs  |
| uname | Linux 65e5605ad887 3.13.0-119-generic #166-Ubuntu SMP Wed May 3 
12:18:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / 9a7e810 |
| maven | version: Apache Maven 3.3.9 |
| shellcheck | v0.4.6 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13597/testReport/ |
| asflicense | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13597/artifact/out/patch-asflicense-problems.txt
 |
| modules | C: hadoop-common-project/hadoop-common 
hadoop-hdfs-project/hadoop-hdfs hadoop-yarn-project/hadoop-yarn 
hadoop-mapreduce-project U: . |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/13597/console |
| Powered by | Apache Yetus 0.7.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
> 

[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-26 Thread Arpit Agarwal (JIRA)

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

Arpit Agarwal commented on HADOOP-14976:


bq. So we could just change the top to remove the calculation off of MYNAME, 
running the risk that someone who copies and pastes the code without 
understanding it may make some big mistakes.
Thank you for suggesting that alternative. What do you think is the right thing 
to do - make that change and formalize the fact that these environment 
variables are not meant to be renamed; or leave it as it is to avoid copy-paste 
bugs like you described?

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-26 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HADOOP-14976:
---

Actually, there is an easy way out of this:  hard set HADOOP_SHELL_EXECNAME 
rather than calculate it dynamically.

Originally, HADOOP_SHELL_EXECNAME was meant to be 'smart' and was only used for 
hadoop_usage output.  When dynamic subcommands came along, it became obvious 
that the code would need some way to tell apart commands.  
HADOOP_SHELL_EXECNAME got re-purposed a bit but kept the dynamic nature to make 
it easy to copy-n-paste the header between the executables.

So we could just change the top to remove the calculation off of MYNAME, 
running the risk that someone who copies and pastes the code without 
understanding it may make some big mistakes.  [IMO, this risk is higher than 
one would think, given how often hadoop's shell code was previously propagated. 
 Those mistakes are still being repeated in new projects.]

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-25 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HADOOP-14976:
---

bq. allow multi-versioning 

Ignoring the whole Linux alternatives bits, it's probably easier to write a 
custom hdfs wrapper that does this.  e.g.:

/usr/bin/hdfs  = wrapper
/usr/hadoop-3.0.0/bin/hdfs = 3.0.0 hdfs
/usr/hadoop-3.1.0/bin/hdfs = 3.1.0 hdfs
/usr/hadoop-default symlink to hadoop-3.0.0

wrapper basically adds --version parameter:

hdfs --version 3.0.0 foo   => exec /usr/hadoop-3.0.0/bin/hdfs
hdfs --version 3.1.0 foo   => exec /usr/hadoop-3.1.0/bin/hdfs
hdfs foo   => exec /usr/hadoop-default/bin/hdfs

Plus this works with any version of Hadoop and it's a relatively simple 
script. (10 lines max?)

You can also cheat and use .hadoop-env / .hadooprc to do some of the same sorts 
of things for individual users, but that's a bit more complicated.



> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-25 Thread Arpit Agarwal (JIRA)

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

Arpit Agarwal commented on HADOOP-14976:


I see, thank you for the clarification.

In this case, the scripts were historically renamed to allow multi-versioning - 
during upgrades for example. Perhaps the 3.0 script rewrite makes it easier to 
do this differently. I can guess why the variable name detection is done this 
way in 3.0 - it allows separating out script-specific logic into the generic 
hadoop-functions.sh which is neat.

For now it's just an unexpected side effect that rename breaks the 
interpretation of shell variables. My first thought was letting script callers 
override HADOOP_SHELL_EXECNAME, so scripts don't initialize it if it's already 
set. One situation where that might break things is when one script invokes and 
we want HADOOP_SHELL_EXECNAME to reflect the callee script. It looks like that 
doesn't happen today though, scripts like hadoop-distcp.sh and 
hadoop-streaming.sh don't rewrite HADOOP_SHELL_EXECNAME.

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-24 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HADOOP-14976:
---

bq. since the calling script always knows what is necessary? 

I'd need to be convinced this is true.  A lot of the work done in the shell 
script rewrite and follow on work was to make the "front end" scripts as dumb 
as possible in order to centralize the program logic.  This gave huge benefits 
in the form of script consistency, testing, and more.

Besides, CLASSNAME and EXECNAME are used for *very* different things and aren't 
guaranteed to match.

e.g.:

https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L67
https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-distcp/src/main/shellprofile.d/hadoop-distcp.sh#L20

are great examples where the execname is exactly what needs to be reported. 

.. and that's even before 3rd party add-ons that might expect 
HADOOP_SHELL_EXECNAME to work as expected.


If distributions really are renaming the scripts (which is extremely 
problematic for lots of reasons), there isn't much of a reason they couldn't 
just tuck them away in a non-PATH directory and use the same names or even just 
rewrite the scripts directly.  (See above about removing as much logic as 
possible.)

I've had in my head a "vendor" version of hadoop-user-function.sh, but I'm not 
sure if even that would help here.  It really depends upon the why the bin 
scripts are getting renamed, if the problem being solved is actually more 
appropriate for hadoop-layout.sh, etc.

I see nothing but pain and misfortune for mucking with HADOOP_SHELL_EXECNAME 
though.

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-24 Thread Arpit Agarwal (JIRA)

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

Arpit Agarwal commented on HADOOP-14976:


bq. Worse, it pretty much breaks the Hadoop user experience.
Agreed, not a great user experience to change names of standard environment 
variables. If the variable names are fixed, is there a benefit to inferring 
HADOOP_SHELL_EXECNAME instead of passing a fixed string to 
{{hadoop_subcommand_opts}}, since the calling script always knows what is 
necessary? e.g. do you see any downside to updating the following line
https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L269

to
{code}
hadoop_java_exec hdfs "${HADOOP_CLASSNAME}" "${HADOOP_SUBCMD_ARGS[@]}"
{code}

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-24 Thread Allen Wittenauer (JIRA)

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

Allen Wittenauer commented on HADOOP-14976:
---

bq. This is not a valid bash variable name.

Worse, it pretty much breaks the Hadoop user experience.

bq. There may be better alternatives.

Maybe the bigger question is why would a distribution rename the binaries.  
With hadoop 3.x being significantly more flexible as to the shell environment 
configuration (e.g., function overrides) those distributions might need to 
reconsider their strategies.


> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-14976) Allow overriding HADOOP_SHELL_EXECNAME

2017-10-24 Thread Arpit Agarwal (JIRA)

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

Arpit Agarwal commented on HADOOP-14976:


Allowing calling scripts to override the HADOOP_SHELL_EXECNAME detection is 
just one possible solution. There may be better alternatives.

> Allow overriding HADOOP_SHELL_EXECNAME
> --
>
> Key: HADOOP-14976
> URL: https://issues.apache.org/jira/browse/HADOOP-14976
> Project: Hadoop Common
>  Issue Type: Improvement
>Reporter: Arpit Agarwal
>
> Some Hadoop shell scripts infer their own name using this bit of shell magic:
> {code}
>  18 MYNAME="${BASH_SOURCE-$0}"
>  19 HADOOP_SHELL_EXECNAME="${MYNAME##*/}"
> {code}
> e.g. see the 
> [hdfs|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs#L18]
>  script.
> The inferred shell script name is later passed to _hadoop-functions.sh_ which 
> uses it to construct the names of some environment variables. E.g. when 
> invoking _hdfs datanode_, the options variable name is inferred as follows:
> {code}
> # HDFS + DATANODE + OPTS -> HDFS_DATANODE_OPTS
> {code}
> This works well if the calling script name is standard {{hdfs}} or {{yarn}}. 
> If a distribution renames the script to something like foo.bar, , then the 
> variable names will be inferred as {{FOO.BAR_DATANODE_OPTS}}. This is not a 
> valid bash variable name.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org