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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…