#! /bin/bash my_start(){ ?? ?if [ $1 == "start" ]; then ?? ??? ?#start hadoop ?? ??? ?sh /opt/soft/hadoop260/sbin/start-dfs.sh ?? ??? ?sh /opt/soft/hadoop260/sbin/start-yarn.sh ?? ??? ?#shart hive ?? ??? ?nohup /opt/soft/hive110/bin/hive --service hiveserver2 & ?? ??? ?#start zeppelin ?? ??? ?sh /opt/soft/zeppelin081/bin/zeppelin-daemon.sh start ?? ??? ?echo "start over" ?? ?else ?? ??? ?#close zeppelin ?? ??? ?sh /opt/soft/zeppelin081/bin/zeppelin-daemon.sh stop ?? ??? ?#close hive ?? ??? ?hiveprocess=`jps | grep RunJar | awk '{print $1}'` ?? ??? ?for no in $hiveprocess; do ?? ??? ??? ?kill -9 $no ?? ??? ?done ?? ??? ?#stop hadoop ?? ??? ?sh /opt/soft/hadoop260/sbin/stop-dfs.sh ?? ??? ?sh /opt/soft/hadoop260/sbin/stop-yarn.sh ?? ??? ?echo "stop over" ?? ?fi } my_start $1
|