Changeset 226
- Timestamp:
- Jun 25, 2010, 3:03:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/shell/master_remove.sh
r224 r226 43 43 show_info "$MR_shutdown_service_echo_1" # "停止其他尚未關閉的slaves服務..." 44 44 slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1` 45 45 46 for nutch_node in $slaves_list 46 47 do 47 48 show_info "驗證叢集狀態" 48 49 49 # TaskTrackerStatus=`ssh -o StrictHostKeyChecking=no $nutch_node "jps |grep TaskTracker |sed 's/[0-9]* //g'"` 50 # DataNodeStatus=`ssh -o StrictHostKeyChecking=no $nutch_node "jps |grep DataNode |sed 's/[0-9]* //g'"` 50 51 51 if [ $ TaskTrackerStatus== "TaskTracker" ]; then52 if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep TaskTracker |sed 's/[0-9]* //g'") == "TaskTracker" ]; then 52 53 show_info "TaskTracker@$nutch_node is running, we will shutdown it!" 53 54 su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker" 54 55 fi 55 56 56 if [ $ DataNodeStatus== "DataNode" ]; then57 if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep DataNode |sed 's/[0-9]* //g'") == "DataNode" ]; then 57 58 show_info "DataNode@$nutch_node is running, we will shutdown it!" 58 59 show_info "Shutdown $nutch_node."
Note: See TracChangeset
for help on using the changeset viewer.