Sparkの複数のバージョンがインストールされていますが、SPARK_MAJOR_VERSIONが設定されていません



Multiple Versions Spark Are Installed Spark_major_version Is Not Set



spark-submitを使用してアプリケーションを送信すると、次の問題が発生します。

Sparkの複数のバージョンがインストールされていますが、SPARK_MAJOR_VERSIONが設定されていませんSpark1がデフォルトで選択されます



次に、Sparkのバージョンが複数ある場合、デフォルトでSpark1.xが使用されます。

$ spark-submit --version Multiple versions of Spark are installed but SPARK_MAJOR_VERSION is not set Spark1 will be picked by default Welcome to ____ __ / __/__ ___ _____/ /__ _ / _ / _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_ version 1.6.3 /_/ Type --help for more information.

使用バージョンの指定方法は?



ターミナルを開き、次のコマンドを入力します。

$ export SPARK_MAJOR_VERSION=2

Spark-Submitバージョンをもう一度確認してください

$ spark-submit --version SPARK_MAJOR_VERSION is set to 2, using Spark2 Welcome to ____ __ / __/__ ___ _____/ /__ _ / _ / _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_ version 2.1.1.2.6.1.0-129 /_/ Using Scala version 2.11.8, Java HotSpot(TM) 64-Bit Server VM, 1.8.0_112 Type --help for more information.

実施する!楽しめ!