Changeset 141 for hadoop4win-setup/my_packages/hbase/bin/hbase-init
- Timestamp:
- Feb 4, 2010, 5:23:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
hadoop4win-setup/my_packages/hbase/bin/hbase-init
r140 r141 1 1 #!/bin/bash 2 2 if [ ! -f /usr/src/hbase-0.20.3.tar.gz ]; then 3 wget http://ftp.twaren.net/Unix/Web/apache/hadoop/hbase/hbase-0.20.3/hbase-0.20.3.tar.gz - o/usr/src/hbase-0.20.3.tar.gz3 wget http://ftp.twaren.net/Unix/Web/apache/hadoop/hbase/hbase-0.20.3/hbase-0.20.3.tar.gz -O /usr/src/hbase-0.20.3.tar.gz 4 4 fi 5 5 6 6 tar zxvf /usr/src/hbase-0.20.3.tar.gz -C /opt 7 7 ln -s /opt/hbase-* /opt/hbase 8 8 9 cp /opt/hadoop/conf/core-site.xml /opt/hbase/conf 9 10 cp /opt/hadoop/conf/hdfs-site.xml /opt/hbase/conf 10 11 cp /opt/hadoop/conf/mapred-site.xml /opt/hbase/conf 12 11 13 cat >> /opt/hbase/conf/hbase-env.sh << EOF 12 14 export JAVA_HOME=$JAVA_HOME … … 15 17 export HBASE_MANAGES_ZK=true 16 18 EOF 19 17 20 cat > /opt/hbase/conf/hbase-site.xml << EOF 18 21 <?xml version="1.0"?> … … 23 26 <value>hdfs://localhost:9000/hbase</value> 24 27 </property> 28 <property> 29 <name>hbase.cluster.distributed</name> 30 <value>true</value> 31 </property> 25 32 </configuration> 26 33 EOF 34 35 echo "export PATH=/opt/hbase/bin/:\$PATH" >> /etc/profile 36 echo "/bin/stop-hbase" > ~/.bash_logout 37 echo "/bin/stop-hadoop" >> ~/.bash_logout 38 echo "/bin/stop-hbase" > /etc/skel/.bash_logout 39 echo "/bin/stop-hadoop" >> /etc/skel/.bash_logout 40 41 cat > ~/hbase-test << EOF 42 create 'test','data' 43 put 'test','row1','data:1','v1' 44 put 'test','row2','data:2','v2' 45 put 'test','row3','data:3','v3' 46 scan 'test' 47 disable 'test' 48 drop 'test' 49 list 50 exit 51 EOF
Note: See TracChangeset
for help on using the changeset viewer.