hadoophivehbasespark
1. Hbase
hbase-env.sh
代码语言:javascript复制export JAVA_HOME=/usr/java/jdk1.8.0_162
export HADOOP_HOME=/opt/soft/hadoop-2.8.3
export HBASE_HOME=/opt/soft/hbase-2.0.0
export HBASE_CLASSPATH=/opt/soft/hadoop-2.8.3/etc/hadoop
export HBASE_PID_DIR=/opt/data/hbase_data/pids
export HBASE_MANAGES_ZK=false
hbase-site.xml
代码语言:javascript复制 <property>
<name>hbase.rootdir</name>
<value>hdfs://node:8020/hbase</value>
<description>The directory shared byregion servers.</description>
</property>
<!-- hbase端口 -->
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<!-- 超时时间 -->
<property>
<name>zookeeper.session.timeout</name>
<value>120000</value>
</property>
<!--防止服务器时间不同步出错 -->
<property>
<name>hbase.master.maxclockskew</name>
<value>150000</value>
</property>
<!-- 集群主机配置 -->
<property>
<name>hbase.zookeeper.quorum</name>
<value>node,node1,node2,node3</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/data/zookeeper_data/</value>
</property>
<!-- 路径存放 -->
<property>
<name>hbase.tmp.dir</name>
<value>/opt/data/hbase_data/tmp</value>
</property>
<!-- true表示分布式 -->
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<!-- 指定master -->
<property>
<name>hbase.master</name>
<value>node:60000</value>
</property>
<property>
<name>hbase.coprocessor.abortonerror</name>
<value>false</value>
</property>
regionservers
代码语言:javascript复制node1
node2
node3
启动 / 停止 命令
代码语言:javascript复制start-hbase.sh
stop-hbase.sh
Hbase_webUI 端口
- 16010
shell
代码语言:javascript复制[root@node ~]# hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/soft/hbase-2.0.0/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/soft/hadoop-2.8.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
Version 2.0.0, r7483b111e4da77adbfc8062b3b22cbe7c2cb91c1, Sun Apr 22 20:26:55 PDT 2018
Took 0.0040 seconds
hbase(main):001:0> list
TABLE
0 row(s)
Took 0.9192 seconds
=> []
hbase(main):002:0> status
1 active master, 0 backup masters, 3 servers, 0 dead, 0.6667 average load
Took 0.2078 seconds
hbase(main):003:0>
PS.
- RPC版本可能不一致,所以HBase lib目录中的Hadoop jar版本应和安装的Hadoop版本一致,将相应jar拷贝至HBase lib中
本文由 bytebye 创作 本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名