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 <[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
