Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/3561#discussion_r22067557
--- Diff:
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
@@ -123,14 +124,21 @@ private[spark] class SparkSubmitArguments(args:
Seq[String], env: Map[String, St
// Try to set main class from JAR if no --class argument is given
if (mainClass == null && !isPython && primaryResource != null) {
- try {
- val jar = new JarFile(primaryResource)
- // Note that this might still return null if no main-class is set;
we catch that later
- mainClass =
jar.getManifest.getMainAttributes.getValue("Main-Class")
- } catch {
- case e: Exception =>
- SparkSubmit.printErrorAndExit("Cannot load main class from JAR:
" + primaryResource)
- return
+ val uri = new URI(primaryResource)
+ val uriScheme = uri.getScheme()
+ // Note that this might still return null if no main-class is set;
we catch that later
--- End diff --
```
// Note that this might still return null if no main-class is set; we catch
that later
```
I'm confused, what might still return null? I don't think this comment is
super necessary.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]