Changes between Version 11 and Version 12 of jazz/DRBL_Hadoop
- Timestamp:
- Nov 7, 2008, 7:09:26 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
jazz/DRBL_Hadoop
v11 v12 113 113 exit 0 114 114 }}} 115 * edit rc.localfor DRBL client as datanode115 * edit hadoop_datanode for DRBL client as datanode 116 116 {{{ 117 ~$ cat > rc.local<< EOF117 ~$ cat > hadoop_datanode << EOF 118 118 }}} 119 119 {{{ 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 121 set -e 122 123 # /etc/init.d/hadoop_datanode: start and stop Hadoop DFS datanode for DRBL Client 124 125 export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" 126 127 case "\$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 142 esac 143 123 144 exit 0 124 145 EOF 125 146 }}} 126 147 {{{ 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 132 151 }}} 133 152 * shutdown DRBL clients