Changeset 226


Ignore:
Timestamp:
Jun 25, 2010, 3:03:35 PM (14 years ago)
Author:
shunfa
Message:

修改master remove

File:
1 edited

Legend:

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

    r224 r226  
    4343  show_info "$MR_shutdown_service_echo_1" # "停止其他尚未關閉的slaves服務..."
    4444  slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1`
     45 
    4546  for nutch_node in $slaves_list
    4647  do
    4748    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'"`
     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'"`
    5051
    51     if [ $TaskTrackerStatus == "TaskTracker" ]; then
     52    if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep TaskTracker |sed 's/[0-9]* //g'") == "TaskTracker" ]; then
    5253       show_info "TaskTracker@$nutch_node is running, we will shutdown it!"
    5354       su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
    5455    fi
    5556
    56     if [ $DataNodeStatus == "DataNode" ]; then
     57    if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep DataNode |sed 's/[0-9]* //g'") == "DataNode" ]; then
    5758       show_info "DataNode@$nutch_node is running, we will shutdown it!"
    5859       show_info "Shutdown $nutch_node."
Note: See TracChangeset for help on using the changeset viewer.