Skip to content

Commit 4d511e7

Browse files
author
Marcelo Vanzin
committed
Fix tools search code.
1 parent 7a01e4a commit 4d511e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

launcher/src/main/java/org/apache/spark/launcher/SparkClassLauncher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ protected List<String> buildLauncherCommand() throws IOException {
6969
memKey = "SPARK_EXECUTOR_MEMORY";
7070
} else if (className.startsWith("org.apache.spark.tools.")) {
7171
String sparkHome = getSparkHome();
72-
File toolsDir = new File(join(sparkHome, "tools", "target",
72+
File toolsDir = new File(join(File.separator, sparkHome, "tools", "target",
7373
"scala-" + getScalaVersion()));
7474
checkState(toolsDir.isDirectory(), "Cannot find tools build directory.");
7575

76-
Pattern re = Pattern.compile("spark-tools-.*\\.jar");
76+
Pattern re = Pattern.compile("spark-tools_.*\\.jar");
7777
for (File f : toolsDir.listFiles()) {
7878
if (re.matcher(f.getName()).matches()) {
7979
extraClassPath = f.getAbsolutePath();

0 commit comments

Comments
 (0)