Hbase 2.1.0 安装

环境准备

cd /usr/lib&&ln -s /opt/apps/hbase-2.1.0 hbase-current

# set the hbase home
export HBASE_HOME="/usr/lib/hbase-current"

# set hbase log dir
export HBASE_LOG_DIR="/data/bigdata/log/hadoop-hbase"

if [[ -n $HBASE_HOME ]]; then
  export PATH=$HBASE_HOME/bin:$PATH
fi

修改配置

hbase-site.xml

<configuration>                                                                  
  <property>                                                                     
    <name>hbase.zookeeper.quorum</name>                                          
    <value>master,node1,node2</value>                                            
    <description>The directory shared by RegionServers.                          
    </description>                                                               
  </property>                                                                    
  <property>                                                                     
    <name>hbase.zookeeper.property.dataDir</name>                                
    <value>/hbase/zk-data/zookeeper</value>                                      
    <description>Property from ZooKeeper config zoo.cfg.                         
    The directory where the snapshot is stored.                                  
    </description>                                                               
  </property>                                                                    
  <property>                                                                     
    <name>hbase.rootdir</name>                                                   
    <value>hdfs://master:9000/hbase</value>                                      
    <description>The directory shared by RegionServers.                          
    </description>                                                               
  </property>                                                                    
  <property>                                                                     
    <name>hbase.cluster.distributed</name>                                       
    <value>true</value>                                                          
    <description>The mode the cluster will be in. Possible values are            
      false: standalone and pseudo-distributed setups with managed ZooKeeper     
      true: fully-distributed with unmanaged ZooKeeper Quorum (see hbase-env.sh) 
    </description>                                                               
  </property>

<property>
  <name>hbase.unsafe.stream.capability.enforce</name>
  <value>false</value>
</property>                                                             
</configuration>                                                                 

hbase-env.sh

# Tell HBase whether it should manage it's own instance of ZooKeeper or not.
# export HBASE_MANAGES_ZK=true
export HBASE_MANAGES_ZK=false

启动

hbase-daemon.sh  start master & (master)

hbase-daemon.sh  start regionserver & (all)

遇到问题

1.java.lang.NoClassDefFoundError: org/apache/htrace/SamplerBuilder

cp  $HBASE_HOME/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar $HBASE_HOME/lib/
    原文作者:xiao_kong
    原文地址: https://www.jianshu.com/p/de22c3de5b7d
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞