Hbase cluster construction

Hbase cluster construction

  • download
wget -c http://ftp.riken.jp/net/apache/hbase/1.4.1/hbase-1.4.1-bin.tar.gz
  • decompress
tar -zxvf hbase-1.4.1-bin.tar.gz -C /usr/java/

The hbase folder and its subfolders can be set as the current user group:

chown -R wujinlei:wujinlei hbase-1.4.1
  • Configure environment variables, edit files/etc/profile
export HBASE_HOME=/usr/java/hbase-1.4.1
export PATH=$HBASE_HOME/bin:$PATH
  • Effective immediately
source /etc/profile
  • Zookepper cluster construction, see zookeeper cluster construction
  • Hbase configuration
    • Edit conf/hbase-env.sh, close the zookepper that comes with Hbase
    export JAVA_HOME=/usr/java/jdk1.8.0_45
    export HBASE_MANAGES_ZK=false
    
    • editconf/hbase-site.xml
    <configuration>
      <property>
        <name>hbase.rootdir</name>
        <value>hdfs://master:9000/hbase</value>
      </property>
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
      <property>
        <name>hbase.zookeeper.quorum</name>
        <value>master,slave1,slave2</value>
      </property>
    </configuration>
    
    • editconf/regionservers
    slave1
    slave2
    
    • Override the above configuration file slave1and slave2node
  • start up
    • start the hadoopcluster
    • start the zookeppercluster
    • start the hbasecluster
    start-hbase.sh
    
  • Enter the shell console of hbase
hbase shell

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325517397&siteId=291194637