consider joining with && so that failures don't get ignored
On 18 February 2014 10:12, Tsuyoshi OZAWA <[email protected]> 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 <[email protected]> > 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.
