Changes between Version 11 and Version 12 of jazz/DRBL_Hadoop


Ignore:
Timestamp:
Nov 7, 2008, 7:09:26 PM (16 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/DRBL_Hadoop

    v11 v12  
    113113 exit 0
    114114}}}
    115  * edit rc.local for DRBL client as datanode
     115 * edit hadoop_datanode for DRBL client as datanode
    116116{{{
    117 ~$ cat > rc.local << EOF
     117~$ cat > hadoop_datanode << EOF
    118118}}}
    119119{{{
    120 #!/bin/sh -e
    121 echo 3 > /proc/sys/vm/drop_caches
    122 /home/jazz/hadoop-0.18.2/bin/hadoop-daemon.sh start datanode
     120#! /bin/sh
     121set -e
     122
     123# /etc/init.d/hadoop_datanode: start and stop Hadoop DFS datanode for DRBL Client
     124
     125export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
     126
     127case "\$1" in
     128  start)
     129        echo -n "mounting /boot:"
     130        /home/jazz/hadoop-0.18.2/bin/hadoop-daemon.sh start datanode
     131        echo "[OK]"
     132        ;;
     133  stop)
     134        echo -n "unmounting /boot:"
     135        /home/jazz/hadoop-0.18.2/bin/hadoop-daemon.sh stop datanode
     136        echo "[OK]"
     137        ;;
     138
     139  *)
     140        echo "Usage: /etc/init.d/hadoop_datanode {start|stop}"
     141        exit 1
     142esac
     143
    123144exit 0
    124145EOF
    125146}}}
    126147{{{
    127 ~$ chmod a+x rc.local
    128 ~$ sudo /opt/drbl/sbin/drbl-cp-host rc.local /etc/
    129 # 由於 DRBL Client 預設不會跑 rc.local,因此要手動加
    130 # 另外,為了避免執行 rc.local 時,硬碟還沒完成掛載動作,因此刻意把 rc.local 挪到最後才執行
    131 ~$ sudo /opt/drbl/bin/drbl-doit update-rc.d rc.local defaults 99
     148~$ chmod a+x hadoop_datanode
     149~$ sudo /opt/drbl/sbin/drbl-cp-host hadoop_datanode /etc/init.d/
     150~$ sudo /opt/drbl/bin/drbl-doit update-rc.d hadoop_datanode defaults 99
    132151}}}
    133152 * shutdown DRBL clients