You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Anand Mundada <an...@ymail.com> on 2014/02/18 07:16:38 UTC
Yarn - Running multiple commands on container
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
Re: Yarn - Running multiple commands on container
Posted by Anand Mundada <an...@ymail.com>.
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 <oz...@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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Anand Mundada <an...@ymail.com>.
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 <oz...@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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Anand Mundada <an...@ymail.com>.
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 <oz...@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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Anand Mundada <an...@ymail.com>.
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 <oz...@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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Steve Loughran <st...@hortonworks.com>.
consider joining with && so that failures don't get ignored
On 18 February 2014 10:12, Tsuyoshi OZAWA <oz...@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 <an...@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
>
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: Yarn - Running multiple commands on container
Posted by Tsuyoshi OZAWA <oz...@gmail.com>.
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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Tsuyoshi OZAWA <oz...@gmail.com>.
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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Tsuyoshi OZAWA <oz...@gmail.com>.
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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Tsuyoshi OZAWA <oz...@gmail.com>.
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 <an...@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
Re: Yarn - Running multiple commands on container
Posted by Tsuyoshi OZAWA <oz...@gmail.com>.
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 <an...@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