Skip to content

Commit a043039

Browse files
author
Brennon York
committed
updated to split the uri and jar vals
1 parent 8da7cbf commit a043039

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ private[spark] class SparkSubmitArguments(args: Seq[String], env: Map[String, St
125125
// Try to set main class from JAR if no --class argument is given
126126
if (mainClass == null && !isPython && primaryResource != null) {
127127
try {
128-
val jar = new JarFile(new URI(primaryResource).getPath)
128+
val uri = new URI(primaryResource)
129+
val jar = new JarFile(uri.getPath)
129130
// Note that this might still return null if no main-class is set; we catch that later
130131
mainClass = jar.getManifest.getMainAttributes.getValue("Main-Class")
131132
} catch {

0 commit comments

Comments
 (0)