Hbase & single pseudo-distributed deployment

Standalone Deployment

[hadoop@hadoop004 software]$ wget http://archive.cloudera.com/cdh5/cdh/5/hbase-1.2.0-cdh5.12.0.tar.gz

[hadoop@hadoop004 software]$ tar -zxf hbase-1.2.0-cdh5.12.0.tar.gz -C ~/app/

[hadoop@hadoop004 software]$ cd ~/app/hbase-1.2.0-cdh5.12.0/
[hadoop@hadoop004 conf]$ vim hbase-env.sh

export JAVA_HOME=/usr/java/jdk1.8.0_144/
[hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ mkdir -p tmp/hbasedata

[hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ mkdir -p tmp/zkdata
<!--[hadoop@hadoop004 conf]$ vim hbase-site.xml-->

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///home/hadoop/app/hbase-1.2.0-cdh5.12.0/hbasedata</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/hadoop/app/hbase-1.2.0-cdh5.12.0/zkdata</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
  </property>
</configuration>
[hadoop@hadoop004 conf]$ vim ~/.bash_profile

export HBASE_HOME=/home/hadoop/app/hbase-1.2.0-cdh5.12.0
export PATH=$HBASE_HOME/bin:$PATH

[hadoop@hadoop004 conf]$ source ~/.bash_profile
hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ bin/start-hbase.sh
[hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ bin/hbase shell

2019-06-05 17:53:21,984 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/app/hbase-1.2.0-cdh5.12.0/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/app/hadoop-2.6.0-cdh5.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.2.0-cdh5.12.0, rUnknown, Thu Jun 29 04:37:42 PDT 2017

hbase(main):001:0>
hbase(main):002:0* quit

Pseudo-distributed deployment

Shining on the official website

[hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ vim conf/hbase-site.xml
 <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>true</value>
  </property>
<property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
</property>
<property>
  <name>hbase.rootdir</name>
  <value>hdfs://hadoop004:9000/hbase</value>
</property>
<property>
  <name>hbase.zookeeper.quorum</name>
  <value>hadoop004:2181</value>
</property>
[hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ vim conf/hbase-env.sh
#添加
export HBASE_MANAGES_ZK=false

start up

[hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ bin/start-hbase.sh

Hbase & single pseudo-distributed deployment

success! ! !

supplement

When pseudo-distributed installation is not easy, but encountered problems must not panic, to troubleshoot the problem by finding log

Recurring problem

Hbase & single pseudo-distributed deployment
Start by start-hbase.sh Hbase script, then found HMaster jps does not start

In this case, view the log output HMaste
Hbase & single pseudo-distributed deployment

And no useful information

[hadoop@hadoop004 hbase-1.2.0-cdh5.12.0]$ tail -200 /home/hadoop/app/hbase-1.2.0-cdh5.12.0/logs/hbase-hadoop-master-hadoop004.log

Hbase & single pseudo-distributed deployment

Problem is found in the red box here,

Solutions in hbase-site.xml file
Hbase & single pseudo-distributed deployment
to get! ! !

There is also a beginning, start time will default Hbase ZooKeeper Hbase own use, but this time due to my machine has started ZooKeeper, and take up the 2181 port, so it also failed to start the HMaster

solution
Hbase & single pseudo-distributed deployment

Hbase & single pseudo-distributed deployment
Get! ! !

Guess you like

Origin blog.51cto.com/14309075/2414277