PS:WEB-UI里可能会有报错,但不影响普通使用。只是在接入HUE时,会有报错,网上无资料,最近忙碌,暂时未解决。
PS:There may be an error in WEB-UI, but it does not affect the normal use. Only when accessing HUE, there will be an error, there is no information on the Internet, and it has been busy recently and has not been resolved yet.
Profile
#HBase
HBASE_HOME=/usr/java/hbase/hbase2.0
export PATH=$HBASE_HOME/bin:$PATH
$HBASE_HOME/conf/hbase-env.sh
28 export JAVA_HOME=/usr/java/jdk/jdk8
125 export HBASE_MANAGES_ZK=true
$HBASE_HOME/conf/hbase-site.xml
<property>
<name>hbase.rootdir</name>
<value>hdfs://cat4:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
//使用主机名测试失败,换用ip
<value>192.0.96.14</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
接着出现了Hmaster启动一段时间就挂,log里是这样:
2018-06-10 07:00:34,604 ERROR [master/Cat4:16000] master.HMaster: ***** ABORTING master cat4,16000,1528628425902: Unhandled exception. Starting shutdown. *****
java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper operation during component failures, but the underlying filesystem does not support doing so. Please check the config value of 'hbase.procedure.store.wal.use.hsync' to set the desired level of robustness and ensure the config value of 'hbase.wal.dir' points to a FileSystem mount that can provide it.
at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.rollWriter(WALProcedureStore.java:1043)
at org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.recoverLease(WALProcedureStore.java:382)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.start(ProcedureExecutor.java:530)
at org.apache.hadoop.hbase.master.HMaster.startProcedureExecutor(HMaster.java:1222)
at org.apache.hadoop.hbase.master.HMaster.startServiceThreads(HMaster.java:1141)
at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:849)
at org.apache.hadoop.hbase.master.HMaster.startActiveMasterManager(HMaster.java:2019)
at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:553)
at java.lang.Thread.run(Thread.java:748)
hsync问题,还有未列出来的log4j冲突问题
然后才知道官网的Hbase2.0-bin包默认是基于Hadoop2构建的,HBase lib文件夹包含与Hadoop-2.7版本的Hadoop依赖关系,该版本不支持hsync功能,解决方案呢查到好像有两种,
第一种使用maven的这个参数-Dhadoop.profile=3.0来编译从源码编译一个基于Hadoop3的版本,编译输出:hbase/hbase-assembly/target/hbase-3.0.0-SNAPSHOT-bin.tar.gz
git clone https://github.com/apache/hbase.git
cd hbase
mvn clean package -DskipTests assembly:single -Dhadoop.profile=3.0
第二种呢,关闭hsync检查,hbase-site.xml代码如下,测试好像有各种问题:
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
完成,start-hbase.sh
默认WebConsole port:16010