首页 > 代码库 > beeline on spark 自动重启--脚本

beeline on spark 自动重启--脚本

#! /bin/bash

#iplist=(10.130.2.20
)


function monitorbdcmagic()
{
source /etc/profile
line=`sudo lsof -i :11000| grep *:irisa | wc -l`

if [[ $line -eq 1 ]]
then
echo start-thriftserver-withJDBC is running!
else
sh ${SPARK_HOME}/sbin/start-thriftserver-withJDBC.sh
fi
}

#for host in ${iplist[*]};
#do
monitorbdcmagic
#done

 

beeline on spark 自动重启--脚本