Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
448 views
in Technique[技术] by (71.8m points)

python-3.x - 在shell脚本中执行spark Submit命令,这会导致问题(executing spark submit command inside shell script and it is causing a problem)

Below is the file.sh which is written and executing on the server where Spark is installed and it is Standalone installation.

(下面是在安装Spark的服务器上编写并执行的file.sh,它是独立安装。)

#!/bin/sh

(#!/ bin / sh)

echo "Spark execution Started"

(回显“火花执行开始”)

spark-submit /opt/pyspark/sparkjobs/test.py

(spark-submit /opt/pyspark/sparkjobs/test.py)

echo "Spark execution stopped"

(回显“火花执行停止”)

Executing file.sh with below command :

(使用以下命令执行file.sh:)

[email protected]:/opt/pyspark/sparkjobs sh file.sh

([email protected]:/ opt / pyspark / sparkjobs sh file.sh)

Output :

(输出:)

Spark execution Started Error: Cannot load main class from JAR file:/opt/pyspark/Sparkjobs/test.py%0D Run with --help for usage help or --verbose for debug output Spark execution Stopped

(Spark执行开始错误:无法从JAR文件加载主类:/opt/pyspark/Sparkjobs/test.py%0D使用--help获得用法帮助,或使用--verbose获得调试输出Spark执行已停止)

  ask by Shashank More translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...