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

spark-class gets syntax error in posix mode

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1.2, 2.2.0
    • Component/s: Deploy
    • Labels:
      None

      Description

      spark-class gets the following error when running in posix mode:

      spark-class: line 78: syntax error near unexpected token `<'
      spark-class: line 78: `done < <(build_command "$@")'
      


      It appears to be complaining about the process substitution:

      CMD=()
      while IFS= read -d '' -r ARG; do
        CMD+=("$ARG")
      done < <(build_command "$@")
      


      This can be reproduced by first turning on allexport then posix mode:

      set -a -o posix 

      then run something like spark-shell which calls spark-class.


      The simplest fix is probably to always turn off posix mode in spark-class before the while loop.
      This was previously reported in SPARK-8417 which closed with cannot reproduce.

        Attachments

          Activity

            People

            • Assignee:
              jyu0 Jessie Yu
              Reporter:
              jyu0 Jessie Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: