hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tsuyoshi OZAWA <ozawa.tsuyo...@gmail.com>
Subject Re: Yarn - Running multiple commands on container
Date Tue, 18 Feb 2014 18:12:36 GMT
Hi Anand and YARN developers,

I found that UnixShellScriptBuilder#command just concatenates
each commands with space, not with ";".
Therefore, you need to suffix ";" after commands you'd like to execute.

UnixShellScriptBuilder {
   @Override
    public void command(List<String> command) {
      line("exec /bin/bash -c \"", StringUtils.join(" ", command), "\"");
    }
}

> YARN developers
Is this expected behavior? IMO, this seems to go against instinct of users.
Javadoc of ContainerLaunchContext#setCommands says:
"@param commands the list of <em>commands</em> for launching the container",
so should we each commands with ";"?

Thanks,
- Tsuyoshi

On Mon, Feb 17, 2014 at 10:16 PM, Anand Mundada <anandmundada@ymail.com> wrote:
> Hi all,
>
> I am using
> containerLaunchContext.setCommands() to add different commands that I wanted
> to run on container.
> But only first command is getting execute.
> Is there is something else I need to do?
>
> Code:
> List<String> commands = new ArrayList<String>();
> commands.add(cmd1);
> commands.add(cmd2);
>
> I can see only cmd1 is getting executed.
>
> Thanks,
> Anand



-- 
- Tsuyoshi

Mime
View raw message