0
点赞
收藏
分享

微信扫一扫

HBase安装教程

成义随笔 2022-03-17 阅读 58

文章目录


前言

Hbase是一个行列存储数据库,本文是安装Hbase的教程。


一、HBase是什么?

HBase是谷歌三大论文中的big table的一种实现形式,非关系型数据库,存储结构非行时存储,是一种列簇存储结构,以Rowkey作为识别标记。

二、使用步骤

1.解压缩

代码如下(示例):

把我链接里面的hbase安装包上传到虚拟机中

链接:https://pan.baidu.com/s/1UDAJq-GZ1oEQbQKtjI_rwg
提取码:tu4w
--来自百度网盘超级会员V1的分享

2.设置配置文件

代码如下(示例):

export JAVA_HOME=/dusr/local/jdk
export HBASE_MANAGES_ZK=false

配置hbase-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<configuration>
	<property>
		<name>hbase.rootdir</name>
		<value>hdfs://qianfeng01:8020/hbase</value>
	</property>
	<property>
		<name>hbase.zookeeper.quorum</name>
		<value>192.168.10.101:2181</value>
	</property>
	<property>
		<name>hbase.cluster.distributed</name>
		<value>true</value>
	</property>
</configuration>

上面的配置是和hadoop相关

3、测试

[root@qianfeng01 conf]# zookeeper-server-start.sh -daemon /usr/local/kafka/config/zookeeper.properties
[root@qianfeng01 conf]# start-hbase.sh
starting master, logging to /usr/local/hbase/logs/hbase-root-master-qianfeng01.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
starting regionserver, logging to /usr/local/hbase/logs/hbase-root-1-regionserver-qianfeng01.out
[root@qianfeng01 conf]# hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hbase/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/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; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.3.6, r806dc3625c96fe2cfc03048f3c54a0b38bc9e984, Tue Oct 15 01:55:41 PDT 2019

hbase(main):001:0>


举报

相关推荐

0 条评论