Changeset 183 for nutchez-0.2/src/test/nutchez
- Timestamp:
- Jun 11, 2010, 6:07:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/nutchez
r182 r183 64 64 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" \ 65 65 --title "[Management Options]" \ 66 --menu "Plz choose: " 15 60 6\66 --menu "Plz choose: " 15 60 7 \ 67 67 "cluster_status" "Check cluster status" \ 68 "cluster_setup" "Setup your datanode & tasktracker" \ 68 "server_setup" "Setup namenode & jobtracker" \ 69 "cluster_setup" "Setup datanode & tasktracker" \ 69 70 "tomcat_switch" "Start/Stop/Restart Tomcat" \ 70 71 "tomcat_port" "Change Tomcat port" \ … … 109 110 --title "[Cluster Status]" --textbox $clusterStatus 20 90 110 111 } 112 113 114 ## [Cluster Setup (namenode & jobtracker)] ## 115 function server_setup(){ 116 serverSetup=/tmp/serverSetup 117 pid_name=$(jps | grep NameNode) 118 pid_job=$(jps | grep JobTracker) 119 120 if [ -z "$pid_name" -a -z "$pid_job" ]; then 121 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Server Status]" \ 122 --msgbox "Namenode & Jobtracker are not running" 7 50 123 elif [ -z "$pid_name" -a -n "$pid_job" ]; then 124 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Server Status]" \ 125 --msgbox "Jobtracker is running, Namenode is not running" 7 50 126 elif [ -n "$pid_name" -a -z "$pid_job" ]; then 127 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Server Status]" \ 128 --msgbox "Namenode is running, Jobtracker is not running" 7 50 129 else 130 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Server Status]" \ 131 --msgbox "Namenode & Jobtracker are running" 7 50 132 fi 133 134 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Namenode & Jobtracker Setup]" \ 135 --menu "Plz choose: " 15 65 4 \ 136 "start" "Start namenode & jobtracker" \ 137 "stop" "Stop namenode & jobtracker" \ 138 "restart" "restart namenode & jobtracker" \ 139 "exit" "Exit" 2>$serverSetup 140 141 if [ "$(cat $serverSetup)" == "start" ]; then 142 $NutchEZ_Install_PATH/nutch/bin/start-dfs.sh 143 $NutchEZ_Install_PATH/nutch/bin/start-mapred.sh 144 elif [ "$(cat $serverSetup)" == "stop" ]; then 145 $NutchEZ_Install_PATH/nutch/bin/stop-dfs.sh 146 $NutchEZ_Install_PATH/nutch/bin/stop-mapred.sh 147 elif [ "$(cat $serverSetup)" == "restart" ]; then 148 $NutchEZ_Install_PATH/nutch/bin/stop-dfs.sh 149 $NutchEZ_Install_PATH/nutch/bin/stop-mapred.sh 150 $NutchEZ_Install_PATH/nutch/bin/start-dfs.sh 151 $NutchEZ_Install_PATH/nutch/bin/start-mapred.sh 152 else 153 exit 154 fi 155 156 157 } 158 111 159 112 160 ## [Cluster Setup (datanode & tasktracker)] ## … … 289 337 "cluster_status") 290 338 cluster_status;; 339 "server_setup") 340 server_setup;; 291 341 "cluster_setup") 292 342 cluster_setup;;
Note: See TracChangeset
for help on using the changeset viewer.