spark submit 运行的时候增加ack命令
生活随笔
收集整理的這篇文章主要介紹了
spark submit 运行的时候增加ack命令
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
shell運行的時候增加ack命令
在提交spark任務的時候擔心寫錯索引名(spark重建索引),所以增加了一個暫停機制,讓執行者再check一下,可以使用下面的樣例來進行
cat submit.sh set -e export JAVA_HOME=/test/jdk1.8.0_181 # // 設置jdk版本 export SPARK_HOME=/test/spark-2.0.1-bin-2.6.0-cdh5.15.0/ # //設置使用spark2 echo "-------------------------------------------------------------------------------------------------" echo "try to rebuild the talent index" echo "index can be: test_user_v2_r0 , test_user_v2_r1" echo "-------------------------------------------------------------------------------------------------"WRITE_INDEX=$1 echo "indexer to rebuild : $WRITE_INDEX"if [ -z $WRITE_INDEX ]thenecho "you need set the index"exit 1firead -r -p "Are You Sure? [Y/n] " inputcase $input in[yY][eE][sS]|[yY])echo "Yes, will continue";;[nN][oO]|[nN])echo "No, will exit"exit 1;; esacecho " try submit task"nohup spark-submit --deploy-mode client --master yarn --class com.test.search.test.task.RebuildStarter \ --driver-memory 2G \ --num-executors 80 \ --queue algo \ --conf spark.default.parallelism=80 \ --executor-cores 4 \ --executor-memory 16G \ --conf "spark.yarn.appMasterEnv.JAVA_HOME=/test/jdk1.8.0_181" \ --conf "spark.executorEnv.JAVA_HOME=/test/jdk1.8.0_181" \ --conf "spark.yarn.executor.memoryOverhead=2048" \ --conf application.submit.user=test@test.com \ test-profile-dev-1.0-SNAPSHOT.jar \ $WRITE_INDEX > dev.temp.log 2>&1 &主要的精華在這里,可以直接測試
read -r -p "Are You Sure? [Y/n] " inputcase $input in[yY][eE][sS]|[yY])echo "Yes, will continue";;[nN][oO]|[nN])echo "No, will exit"exit 1;; esac總結
以上是生活随笔為你收集整理的spark submit 运行的时候增加ack命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mac golang grpc prot
- 下一篇: centos安装 crf 和 kenlm