Changeset 233


Ignore:
Timestamp:
Jun 28, 2010, 1:31:11 PM (14 years ago)
Author:
shunfa
Message:

關閉maste移除時, 檢查叢集狀態功能

File:
1 edited

Legend:

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

    r232 r233  
    4444  slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1`
    4545 
    46   for nutch_node in $slaves_list
    47   do
    48     show_info "驗證叢集狀態"
    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'"`
     46#  for nutch_node in $slaves_list
     47#  do
     48#    show_info "驗證叢集狀態"
     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'"`
    5151
    52     if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep TaskTracker |sed 's/[0-9]* //g'") == "TaskTracker" ]; then
    53        show_info "TaskTracker@$nutch_node is running, we will shutdown it!"
    54        su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
    55     fi
     52#   if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep TaskTracker |sed 's/[0-9]* //g'") == "TaskTracker" ]; then
     53#       show_info "TaskTracker@$nutch_node is running, we will shutdown it!"
     54#       su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
     55#    fi
    5656
    57     if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep DataNode |sed 's/[0-9]* //g'") == "DataNode" ]; then
    58        show_info "DataNode@$nutch_node is running, we will shutdown it!"
    59        show_info "Shutdown $nutch_node."
    60        su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"
    61     fi
    62   done
     57#    if [ $(ssh -o StrictHostKeyChecking=no nutchuser@$nutch_node "jps |grep DataNode |sed 's/[0-9]* //g'") == "DataNode" ]; then
     58#       show_info "DataNode@$nutch_node is running, we will shutdown it!"
     59#       show_info "Shutdown $nutch_node."
     60#       su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"
     61#    fi
     62#  done
    6363  show_info "$MR_shutdown_service_echo_2" # "關閉本機服務..."
    6464  su nutchuser -c "/opt/nutchez/nutch/bin/stop-all.sh"
Note: See TracChangeset for help on using the changeset viewer.