Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21168#discussion_r184506499
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
 ---
    @@ -675,9 +675,14 @@ private[spark] class ApplicationMaster(args: 
ApplicationMasterArguments) extends
         val userThread = new Thread {
           override def run() {
             try {
    -          mainMethod.invoke(null, userArgs.toArray)
    -          finish(FinalApplicationStatus.SUCCEEDED, 
ApplicationMaster.EXIT_SUCCESS)
    -          logDebug("Done running users class")
    +          if(!Modifier.isStatic(mainMethod.getModifiers)) {
    +            logError(s"Could not find main method in object 
${args.userClass}")
    --- End diff --
    
    The message could be a little more helpful here.


---

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

Reply via email to