spark 脚本

#cat /etc/init.d/spark-thriftserver.sh

#!/bin/bash

# descriptions: This script is using to satrt|stop spark-thriftserver
pid=`netstat -tunlp | grep 32500| awk '{print $NF}'|awk -F "/" '{print $1}'`
case $1 in
start)
cd /data/spark-2.3.2-bin-hadoop2.7/sbin/
./start-thriftserver.sh --hiveconf hive.server2.thrift.port=32500 --master yarn  --executor-memory 5g --total-executor-cores 5
;;
stop)
 kill -9 $pid
;;
*)
echo "Usage: $0 satrt|stop"
esac
发布了10 篇原创文章 · 获赞 3 · 访问量 4559

猜你喜欢

转载自blog.csdn.net/xiaosannimei/article/details/85163788