
#!/bin/bash
jps>tmp.txt
NN=`cat tmp.txt|grep -w NameNode`
DN=`cat tmp.txt|grep -w DataNode`
SNN=`cat tmp.txt|grep -w SecondaryNameNode`
RM=`cat tmp.txt|grep -w ResourceManager`
NM=`cat tmp.txt|grep -w NodeManager`
JHS=`cat tmp.txt|grep -w JobHistoryServer`
if [ ${NN} || ${DN} || ${SNN} ];then
stop-dfs.sh
fi
if [ ${NM} || ${RM} ];then
stop-yarn.sh
fi
if [ ${JHS} ];then
mapred --daemon stop historyserver
fi
unset JHS
unset NM
unset RM
unset SNN
unset DN
unset NN
rm -f tmp.txt
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)