2018年11月29日 星期四

Quick-Start Apache HBase at Local Site

注意事項:
    1. 安裝前請先自行安裝 Java 1.7 JDK 及設定 JAVA_HOME
    2. 此方式啟動時會抓取本機的 ip 變動時會無法連線
       可砍掉 /tmp/zookeeper 後重新啟動
    3. 文章以 1.2.X 版本為範例
  • Download Apache HBase hbase-1.2.9-bin.tar.gz
  • Unzip hbase-1.2.9-bin.tar.gz
    $ mkdir ~/opt && tar -zxvf hbase-1.2.9-bin.tar.gz -C $_
    $ ln -s ~/opt/hbase-1.2.9 ~/opt/hbase
  • Edit ~/.bash_profile add HBASE_HOME and PATH
    HBASE_HOME=~/opt/hbase
    export HBASE_HOME
    
    export PATH=$HBASE_HOME/bin:$PATH
    • After editing using command source ~/.bash_profile
  • Edit ~/opt/hbase/conf/hbase-site.xml Update Content
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <configuration>
        <property>
            <name>hbase.rootdir</name>
            <value>file:///tmp/hbase</value>
        </property>
        <property>
            <name>hbase.zookeeper.property.dataDir</name>
            <value>/tmp/zookeeper</value>
        </property>
        <property>
            <name>hbase.zookeeper.quorum</name>
            <value>localhost</value>
        </property>
    </configuration>
  • Start The HBase
    $ start-hbase.sh

沒有留言:

張貼留言