Changeset 141


Ignore:
Timestamp:
Feb 4, 2010, 5:23:01 PM (15 years ago)
Author:
jazz
Message:

新增 HBase 安裝/啟動/停止 script

Location:
hadoop4win-setup
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • hadoop4win-setup/hadoop4win-setup.bat

    r139 r141  
    128128
    129129copy /Y "%MY_PACKAGE%\hadoop\bin\*" "%CYGWIN_ROOT%\bin"
     130copy /Y "%MY_PACKAGE%\hbase\bin\*" "%CYGWIN_ROOT%\bin"
    130131xcopy /Y /E /I "%MY_PACKAGE%\hadoop\conf-examples" "%HADOOP_DES%\conf-examples"
    131132
  • hadoop4win-setup/my_packages/hbase/bin/hbase-init

    r140 r141  
    11#!/bin/bash
    22if [ ! -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.gz
     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.gz
    44fi
    55
    66tar zxvf /usr/src/hbase-0.20.3.tar.gz -C /opt
    77ln -s /opt/hbase-* /opt/hbase
     8
    89cp /opt/hadoop/conf/core-site.xml /opt/hbase/conf
    910cp /opt/hadoop/conf/hdfs-site.xml /opt/hbase/conf
    1011cp /opt/hadoop/conf/mapred-site.xml /opt/hbase/conf
     12
    1113cat >> /opt/hbase/conf/hbase-env.sh << EOF
    1214  export JAVA_HOME=$JAVA_HOME
     
    1517  export HBASE_MANAGES_ZK=true
    1618EOF
     19
    1720cat > /opt/hbase/conf/hbase-site.xml << EOF
    1821<?xml version="1.0"?>
     
    2326    <value>hdfs://localhost:9000/hbase</value>
    2427  </property>
     28  <property>
     29    <name>hbase.cluster.distributed</name>
     30    <value>true</value>
     31  </property>
    2532</configuration>
    2633EOF
     34
     35echo "export PATH=/opt/hbase/bin/:\$PATH" >> /etc/profile
     36echo "/bin/stop-hbase" > ~/.bash_logout
     37echo "/bin/stop-hadoop" >> ~/.bash_logout
     38echo "/bin/stop-hbase" > /etc/skel/.bash_logout
     39echo "/bin/stop-hadoop" >> /etc/skel/.bash_logout
     40
     41cat > ~/hbase-test << EOF
     42create 'test','data'
     43put 'test','row1','data:1','v1'
     44put 'test','row2','data:2','v2'
     45put 'test','row3','data:3','v3'
     46scan 'test'
     47disable 'test'
     48drop 'test'
     49list
     50exit
     51EOF
Note: See TracChangeset for help on using the changeset viewer.