HBase:简单的安装和启动(Quick Start)

1.声明

当前内容主要用于本人学习和复习,当前内容主要是安装启动HBase

当前内容主要来源:HBase官方文档

2.HBase是什么?

这里主要参考官方介绍:HBase官方介绍
Apache HBase™ is the Hadoop database, a distributed, scalable, big data store.

Apache HBase 是Hadoop的数据库,一个分布式的、可扩展的大数据存储

Use Apache HBase™ when you need random, realtime read/write access to your Big Data. This project’s goal is the hosting of very large tables – billions of rows X millions of columns – atop clusters of commodity hardware. Apache HBase is an open-source, distributed, versioned, non-relational database modeled after Google’s Bigtable: A Distributed Storage System for Structured Data by Chang et al. Just as Bigtable leverages the distributed data storage provided by the Google File System, Apache HBase provides Bigtable-like capabilities on top of Hadoop and HDFS.

在你需要将大数据随机实时的写入和读取的时候可以使用Apche HBase。该项目的目标是在商品硬件群集上托管超大型表-数十亿行X数百万列Apache HBase是一个开源的,分布式的。版本控制的,非关系型数据库,主要参考Chang等人写的谷歌的Bigtable(分布式的结构化数据存储系统)。就像Bigtable一样利用Google文件系统提供的分布式数据存储。Apache HBase在Hadoop和HDFS之上提供了类似Bigtable的功能

分析以上就是,当前的HBase是利用Hadoop和HDFS来提供类似Bigtable的功能,一个分布式的大数据存储的非关系型的数据库(一个数据库)

3.Quick Start - Standalone HBase(快速启动单机版的HBase)

This section describes the setup of a single-node standalone HBase. A standalone instance has all HBase daemons — the Master, RegionServers, and ZooKeeper — running in a single JVM persisting to the local filesystem. It is our most basic deploy profile. We will show you how to create a table in HBase using the hbase shell CLI, insert rows into the table, perform put and scan operations against the table, enable or disable the table, and start and stop HBase.

这部分描述了如何启动单节点单例的HBase。一个单例版的HBase守护线程的实例包含有–Master,RegionServers,和Zookeeper—运行在单个JVM去维护本地文件系统。这是一个最基本的部署文件。我们将告诉你怎样使用HBase Shell命令来实现创建表,向表中插入行,添加和扫描这个表的操作,启用或者禁用表,和启动和停驶HBase

分析发现当前的HBase启动时需要JVM,也就是需要JAVA.

这里是下载解压操作。。。

配置JAVA_HOME

You must set the JAVA_HOME environment variable before starting HBase. To make this easier, HBase lets you set it within the conf/hbase-env.sh file. You must locate where Java is installed on your machine, and one way to find this is by using the whereis java command. Once you have the location, edit the conf/hbase-env.sh file and uncomment the line starting with #export JAVA_HOME=, and then set it to your Java installation path.

你必须启动HBase之前设置JAVA_HOME环境变量。你必须在HBase中的conf/hbase-env.sh文件配置JAVA_HOME。你必须安装在你的机器中安装java,并且使用java命令查看是否安装了如果你在conf/hbase-env.sh文件中一旦找到了以#export JAVA_HOME=开头的位置,那么你就在这里设置你的java安装路径

开始实现解压和配置JAVA_HOME操作
本人下载的路径:HBase2.2.5官方下载

tar xvif hbase-2.2.5-bin.tar.gz

查看是否安装了java

java

在当前的conf/hbase-env.sh中配置JAVA_HOME

vi conf/hbase-env.sh

在这里插入图片描述
当前的Java版本必须是1.8及以上版本

The bin/start-hbase.sh script is provided as a convenient way to start HBase. Issue the command, and if all goes well, a message is logged to standard output showing that HBase started successfully. You can use the jps command to verify that you have one running process called HMaster. In standalone mode HBase runs all daemons within this single JVM, i.e. the HMaster, a single HRegionServer, and the ZooKeeper daemon. Go to http://localhost:16010 to view the HBase Web UI.

这个bin/start-hbase.sh 脚本就是一种启动HBase的方式。调用这个命令,并且如果一切都是好的,并打印输出了日志消息就表示HBase启动成功。你可以使用jps命令去查看名称为HMaster的进程。在单机模式中HBase运行所有的后台使用单个JVM。HMAster,一个单例的HRegionServer,和这个Zookeeper后台。可以通过http://localhost:16010查看HBase的webui界面

启动HBase和开放webui界面让外界访问

开放端口:16010

firewall-cmd --zone=public --add-port=16010/tcp --permanent
systemctl restart firewalld.service
firewall-cmd --reload

启动HBase

./bin/start-hbase.sh

在这里插入图片描述
启动成功,访问webui界面
在这里插入图片描述

4.总结

1.HBase需要依赖jvm环境,需要java 1.8及以上版本才能启动

2.通过配置conf/hbase-env.sh文件中的JAVA_HOME为HBase配置java运行环境

3.通过conf/start-hbase.sh来启动当前的HBase,并可以通过16010端口访问webui界面

以上纯属个人见解,如有问题请联本人!

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值