Changeset 165 for nutchez-0.2/src/test/nutchez
- Timestamp:
- Jun 8, 2010, 3:27:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/nutchez
r162 r165 18 18 function prepare_check(){ 19 19 if [ ! -e /home/nutchuser/nutch_nodes ]; then 20 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title " nutch_nodes Files:" \21 --msgbox "Fail: Don't find /home/nutchuser/nutch_nodes !!!" 10 4020 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[nutch_nodes Files]" \ 21 --msgbox "Fail: Don't find /home/nutchuser/nutch_nodes !!!" 10 40 22 22 exit 23 23 fi 24 24 25 $DIALOG --clear --defaultno --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "/etc/host Update" \ 26 --yesno "Do you want to update /etc/hosts!!!" 6 40 25 $DIALOG --clear --defaultno --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[/etc/host Update]" \ 26 --yesno "Do you want to update \"/etc/hosts\" !!!\n(First time to execute it, please update)" 6 50 27 27 28 28 29 if [ "$?" == "0" ]; then 29 30 ./duplicate_del /home/nutchuser/nutch_nodes 30 echo -e "\nPlz input root password to modify /etc/hosts !!!" 31 su root -c "./duplicate_del /etc/hosts" 32 su root -c "./add_hosts /home/nutchuser/nutch_nodes /etc/hosts" 31 echo -e "\nPlz input root password to update /etc/hosts !!!" 32 su root -c "./duplicate_del /etc/hosts && ./add_hosts /home/nutchuser/nutch_nodes /etc/hosts" 33 33 fi 34 34 … … 40 40 41 41 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" \ 42 --title " management options" \42 --title "[Management Options]" \ 43 43 --menu "Plz choose: " 15 55 5 \ 44 "cluster_setup" "Setup your datanode & task node" \44 "cluster_setup" "Setup your datanode & tasktracker" \ 45 45 "tomcat_switch" "Start/Stop/Restart Tomcat" \ 46 46 "tomcat_port" "Change Tomcat port" \ … … 49 49 } 50 50 51 ## Cluster Setup (datanode & task node) ##51 ## Cluster Setup (datanode & tasktracker) ## 52 52 function cluster_setup(){ 53 53 … … 60 60 #echo $dataNodes 61 61 clusterSetup="/tmp/clusterSetup" 62 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title " Datanode & Tasktracker Setup" \62 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Datanode & Tasktracker Setup]" \ 63 63 --menu "Plz choose: " 10 65 3 \ 64 "start" "Start all datanodes & task crackers in cluster" \65 "stop" "Stop all datanodes & task crackers in cluster" \64 "start" "Start all datanodes & tasktrackers in cluster" \ 65 "stop" "Stop all datanodes & tasktrackers in cluster" \ 66 66 "exit" "Exit" 2>$clusterSetup 67 67 … … 70 70 if [ "$(cat $clusterSetup)" == "start" ]; then 71 71 echo "/opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode" 72 echo "/opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracke "72 echo "/opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker" 73 73 /opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode 74 74 /opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker 75 75 for node in $(echo $node_list) 76 76 do 77 echo -e "ssh $node -c/opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode"78 # ssh $node -c"/opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode"79 echo -e "ssh $node -c/opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker"80 # ssh $node -c"/opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker"77 echo -e "ssh -o StrictHostKeyChecking=no $node /opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode" 78 # ssh -o StrictHostKeyChecking=no $node "/opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode" 79 echo -e "ssh -o StrictHostKeyChecking=no $node /opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker" 80 # ssh -o StrictHostKeyChecking=no $node "/opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker" 81 81 done 82 82 elif [ "$(cat $clusterSetup)" == "stop" ]; then … … 87 87 for node in $(echo $node_list) 88 88 do 89 echo -e "ssh $node -c/opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"90 # ssh $node -c"/opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"91 echo -e "ssh $node -c/opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"92 # ssh $node -c"/opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"89 echo -e "ssh -o StrictHostKeyChecking=no $node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode" 90 # ssh -o StrictHostKeyChecking=no $node "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode" 91 echo -e "ssh -o StrictHostKeyChecking=no $node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker" 92 # ssh -o StrictHostKeyChecking=no $node "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker" 93 93 done 94 94 else … … 103 103 #read 104 104 if [ -n "$pid_tc" ]; then 105 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title " Tomcat Status" \106 --msgbox "Tomcat is runing in this system !!!" 7 50105 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Tomcat Status]" \ 106 --msgbox "Tomcat is runing in this system !!!" 7 50 107 107 else 108 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title " Tomcat Status" \109 --msgbox "Tomcat is not running in this system !!!" 7 50108 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Tomcat Status]" \ 109 --msgbox "Tomcat is not running in this system !!!" 7 50 110 110 fi 111 111 tomcatSwitch="/tmp/tomcatSwitch" 112 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title " Tomcat Service Options" \112 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Tomcat Service Options]" \ 113 113 --menu "Plz choose: " 15 55 4 \ 114 114 "start" "Start tomcat" \ … … 136 136 137 137 if [ ! -e /opt/nutchez/tomcat/conf/server.xml ]; then 138 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title " Tomcat Servel.xml" \138 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Tomcat Servel.xml]" \ 139 139 --msgbox "Fial: Don't find /opt/nutchez/tomcat/conf/server.xml !!!" 10 50 140 140 exit 141 141 fi 142 142 tomcatPort="/tmp/tomcatPort" 143 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC = " --title " Tomcat Port Change" \143 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC = " --title "[Tomcat Port Change]" \ 144 144 --inputbox "Plz input port number for tomcat (default is 8080)" 10 55 2>$tomcatPort 145 145 … … 157 157 echo -e "lang_switch" 158 158 langSwitch="/tmp/langSwitch" 159 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title " Language Change" \159 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" --title "[Language Swaitch]" \ 160 160 --menu "Plz choose: " 15 55 3 \ 161 161 "English" "English" \
Note: See TracChangeset
for help on using the changeset viewer.