YARN-8812. Containers fail during creating a symlink which started with hyphen for a resource file. Contributed by Oleksandr Shevchenko

This commit is contained in:
Jason Lowe 2018-11-28 08:46:11 -06:00
parent 13a21f6607
commit 3ce99e32f7
2 changed files with 2 additions and 2 deletions

View File

@ -1296,7 +1296,7 @@ public class ContainerLaunch implements Callable<Integer> {
@Override
protected void link(Path src, Path dst) throws IOException {
line("ln -sf \"", src.toUri().getPath(), "\" \"", dst.toString(), "\"");
line("ln -sf -- \"", src.toUri().getPath(), "\" \"", dst.toString(), "\"");
}
@Override

View File

@ -167,7 +167,7 @@ public class TestContainerLaunch extends BaseContainerManagerTest {
File shellFile = null;
File tempFile = null;
String badSymlink = Shell.WINDOWS ? "foo@zz_#!-+bar.cmd" :
"foo@zz%_#*&!-+= bar()";
"-foo@zz%_#*&!-+= bar()";
File symLinkFile = null;
try {