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

spark-class doesn't bubble up error from launcher command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Spark Submit
    • None

    Description

      There's a particular snippet in spark-class here that runs the spark-launcher code in a subshell.

      # The launcher library will print arguments separated by a NULL character, to allow arguments with
      # characters that would be otherwise interpreted by the shell. Read that in a while loop, populating
      # an array that will be used to exec the final command.
      CMD=()
      while IFS= read -d '' -r ARG; do
        CMD+=("$ARG")
      done < <("$RUNNER" -cp "$LAUNCH_CLASSPATH" org.apache.spark.launcher.Main "$@")
      

      The problem is that the if the launcher Main fails, this code still still returns success and continues, even though the top level script is marked set -e. This is because the launcher.Main is run within a subshell.

      Attachments

        Activity

          People

            vanzin Marcelo Masiero Vanzin
            mgrover Mark Grover
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: