您好,登錄后才能下訂單哦!
這篇文章給大家分享的是有關如何實現hadoop啟動腳本的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。
#!/bin/bash # The next lines are for chkconfig on RedHat systems. # chkconfig: 35 98 02 # description: Starts and stops hadoop Server #autor:516249940@qq.com #date:2017-03-06 # The next lines are for chkconfig on SuSE systems. # /etc/init.d/xxx # ### BEGIN INIT INFO # Provides: xxx # Required-Start: $network $syslog # Required-Stop: # Default-Start: 2 3 5 # Default-Stop: 0 6 # Short-Description: Starts and stops hadoop Server # Description: Starts and stops hadoop Server ### END INIT INFO HADOOP_SBIN="/usr/local/hadoop/sbin" JAVA_ETC="/etc/alternatives" case $1 in start) $HADOOP_SBIN/start-dfs.sh $HADOOP_SBIN/start-yarn.sh $HADOOP_SBIN/mr-jobhistory-daemon.sh start historyserver echo "the hadoop is ok" ;; stop) $HADOOP_SBIN/mr-jobhistory-daemon.sh stop historyserver $HADOOP_SBIN/stop-yarn.sh $HADOOP_SBIN/stop-dfs.sh echo "the hadoop is stop" ;; restart|reload|force-reload) $HADOOP_SBIN/mr-jobhistory-daemon.sh stop historyserver $HADOOP_SBIN/stop-yarn.sh $HADOOP_SBIN/stop-dfs.sh echo "the hadoop is stop" sleep 3 $HADOOP_SBIN/start-dfs.sh $HADOOP_SBIN/start-yarn.sh $HADOOP_SBIN/mr-jobhistory-daemon.sh start historyserver echo "the hadoop is ok" ;; status) # 查看狀態需要做的步驟 $JAVA_ETC/jps ;; *) echo "$0 {start|stop|restart|status}" exit 4 ;; esac
感謝各位的閱讀!關于“如何實現hadoop啟動腳本”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。