hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Mundada <anandmund...@ymail.com>
Subject Re: Yarn - Running multiple commands on container
Date Tue, 18 Feb 2014 23:09:19 GMT
I tried executing 2 commands deprecated by semicolon ';'. Now I can only execute command two.

Is there is another solution for this?

Thanks,
Anand

Sent from my iPhone

> On Feb 18, 2014, at 12:12 PM, Tsuyoshi OZAWA <ozawa.tsuyoshi@gmail.com> wrote:
> 
> 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