nohup /opt/software/spark/bin/spark-submit \
--name "filtertest" \
--master spark://spark安装的主机名:7077 \
--executor-memory 10G \
--total-executor-cores 20 \
--class emg.branchs.EmgFilterDemo \
/opt/module/testcxb/original-emg.spark-1.0-SNAPSHOT.jar \
hdfs://192.168.40.51:9000/user/hive/warehouse/emg.db/d181119/* \
hdfs://192.168.40.51:9000/user/hive/zz
> /opt/module/testcxb/filtertest.log 2>&1 &
代码如上
注意每一行后面的 \ 一定注意
nohup 后台运行的意思
运行 .yunJob.sh 会自动把运行的日志放到nohup,out里面 不用自己创建 这种写法也不用再脚本里面加 #!/bin/bash
不知道怎么回事