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

Bikas Saha commented on MAPREDUCE-4101:
---------------------------------------

Could you check if the test failure is related to your changes?

Comments

+++ 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java
@@ -379,7 +379,7 @@ public class TaskLog {
     }
   }
 
-  private static final String bashCommand = "bash";
+  private static final String bashCommand = "sh";

Now you might want to rename this to shellCommand.

+++ 
b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
@@ -169,7 +169,7 @@ public class DefaultContainerExecutor extends 
ContainerExecutor {
           ContainerExecutor.TASK_LAUNCH_SCRIPT_PERMISSION);
 
       // Setup command to run
-      String[] command = {"bash", "-c",
+      String[] command = {"/bin/sh", "-c",

Why the extra /bin/ ?


                
> nodemanager depends on /bin/bash
> --------------------------------
>
>                 Key: MAPREDUCE-4101
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4101
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 0.23.1, trunk
>         Environment: FreeBSD 8.2 / 64 bit
>            Reporter: Radim Kolar
>              Labels: patch
>         Attachments: bash-replace-by-sh.txt
>
>
> Currently nodemanager depends on bash shell. It should be well documented for 
> system not having bash installed by default such as FreeBSD. Because only 
> basic functionality of bash is used, probably changing bash to /bin/sh would 
> work enough.
> i found 2 cases:
> 1. DefaultContainerExecutor.java creates file with /bin/bash hardcoded in 
> writeLocalWrapperScript. (this needs bash in /bin)
> 2. yarn-hduser-nodemanager-ponto.amerinoc.com.log:2012-04-03 19:50:10,798 
> INFO org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor: 
> launchContainer: [bash, -c, 
> /tmp/nm-local-dir/usercache/hduser/appcache/application_1333474251533_0002/container_1333474251533_0002_01_000012/default_container_executor.sh]
> this created script is also launched by bash - bash anywhere in path works - 
> in freebsd it is /usr/local/bin/bash

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to