Changeset 222


Ignore:
Timestamp:
Jun 25, 2010, 11:24:28 AM (14 years ago)
Author:
shunfa
Message:

修改remove檔

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/shell/master_remove.sh

    r219 r222  
    4545  for nutch_node in $slaves_list
    4646  do
    47     su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"
    48     su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
     47    show_info "驗證叢集狀態"
     48    TaskTrackerStatus=`ssh -o StrictHostKeyChecking=no $nutch_node "jps |grep TaskTracker |sed 's/[0-9]* //g'"`
     49    DataNodeStatus=`ssh -o StrictHostKeyChecking=no $nutch_node "jps |grep DataNode |sed 's/[0-9]* //g'"`
     50
     51    if [ $TaskTrackerStatus == "TaskTracker" ]; then
     52       show_info "TaskTracker@$nutch_node is running, we will shutdown it!"
     53       su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
     54    fi
     55
     56    if [ $DataNodeStatus == "DataNode" ]; then
     57       show_info "DataNode@$nutch_node is running, we will shutdown it!"
     58       show_info "Shutdown $nutch_node."
     59       su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"
     60    fi
    4961  done
    5062  show_info "$MR_shutdown_service_echo_2" # "關閉本機服務..."
Note: See TracChangeset for help on using the changeset viewer.