YARN-8812. Containers fail during creating a symlink which started with hyphen for a resource file. Contributed by Oleksandr Shevchenko
(cherry picked from commit 3ce99e32f7
)
This commit is contained in:
parent
fc74a3f803
commit
d9457df989
|
@ -1404,7 +1404,7 @@ public class ContainerLaunch implements Callable<Integer> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void link(Path src, Path dst) throws IOException {
|
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
|
@Override
|
||||||
|
|
|
@ -159,7 +159,7 @@ public class TestContainerLaunch extends BaseContainerManagerTest {
|
||||||
File shellFile = null;
|
File shellFile = null;
|
||||||
File tempFile = null;
|
File tempFile = null;
|
||||||
String badSymlink = Shell.WINDOWS ? "foo@zz_#!-+bar.cmd" :
|
String badSymlink = Shell.WINDOWS ? "foo@zz_#!-+bar.cmd" :
|
||||||
"foo@zz%_#*&!-+= bar()";
|
"-foo@zz%_#*&!-+= bar()";
|
||||||
File symLinkFile = null;
|
File symLinkFile = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue