Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19264

Work should start driver, the same to AM of yarn

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • None
    • None

    Description

      I think work can't start driver by "ProcessBuilderLike", thus we can't know the application's main thread is finished or not if the application's main thread contains some non-daemon threads. Because the program terminates when there no longer is any non-daemon thread running (or someone called System.exit). The main thread can have finished long ago.
      worker should start driver like AM of YARN . As followed:

      ApplicationMaster.scala
          
           mainMethod.invoke(null, userArgs.toArray)
           finish(FinalApplicationStatus.SUCCEEDED, ApplicationMaster.EXIT_SUCCESS)
           logDebug("Done running users class")
      

      Then the work can monitor the driver's main thread, and know the application's state.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hustfxj John Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: