spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JoshRosen <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4298][Core] - The spark-submit cannot r...
Date Wed, 24 Dec 2014 22:47:36 GMT
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3561#discussion_r22264611
  
    --- 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 --
    
    @andrewor14 I think that this refers to the `jar.getManifest.getMainAttributes.getValue("Main-Class")`
call.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message