hbase部署
Hbase:
更细的操作和原理研究笔记和视频
cloudera Hbase:
https://sysit.cn/blog/post/sysit/cloudera%E5%AE%89%E8%A3%85HBASE
官网:
https://docs.cloudera.com/documentation/enterprise/6/6.2/topics/hbase.html
CDH启动hbase
https://sysit.cn/blog/post/sysit/cloudera%E5%AE%89%E8%A3%85HBASE
hbase和hive的区别:
hive是数据仓库,适用于海量数据的分析,不适用于实时的读写和更新.
hbase是数据库,适用于随机实时读写
和RDBMS(关系性数据库)的区别
Hbase是分布式数据库,其原型是 Google 的 BigTable,初始作为 Hadoop 的子项目来开发维护,用于支持结构化的数据存储。后期独立出来,成为Apache顶级项目。
Hbase是基于Hadoop的非关系型数据库,实时性,低延迟。分布式、可伸缩、大数据存储。适用于对大数据的随机实时读写操作。
官方对于Hbase单个表能够存储的容量定义为:十亿行x百万列x上千个版本
CDH上启用hbase:
集群--添加服务



部署到客户端并重启:

重启:


检查:
[root@zhep-opay-temp-1 ~]# /usr/bin/hbase shell
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.1.0-cdh6.2.0, rUnknown, Wed Mar 13 23:39:58 PDT 2019
Took 0.0024 seconds
hbase(main):002:0> help
habase手动hadoop集群安装:
wget http://mirrors.hust.edu.cn/apache/hbase/2.1.3/hbase-2.1.3-bin.tar.gz
tar -xzvf hbase-2.1.3-bin.tar.gz -C /opt/module/
vim /etc/profile
export HBASE_HOME=/opt/module/hbase-2.1.3
export PATH=$PATH:$HBASE_HOME/bin
cd /opt/module/hbase-2.1.3/conf/
mv hbase-env.sh hbase-env.sh.bak
vi hbase-env.sh
export JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera
export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
export HBASE_MANAGES_ZK=false
配置hbase-site.xml(清空原配置文件)
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://mycluster/user/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/var/lib/zookeeper</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>zhep-opay-temp-2.novalocal:2181,zhep-opay-temp-3.novalocal:2181,zhep-opay-temp-4.novalocal:2181</value>
</property>
</configuration>
#解释
/opt/cloudera/parcels/CDH/lib/zookeeper
<name>hbase.zookeeper.property.dataDir</name>
<value>/zookeeper/data</value>
<description>
注意这里的zookeeper数据目录与hadoop ha的共用,也即要与 zoo.cfg 中配置的一致
Property from ZooKeeper config zoo.cfg.
The directory where the snapshot is stored.
</description>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
<description>
分布式集群配置,这里要设置为true,如果是单节点的,则设置为false
The mode the cluster will be in. Possible values are
false: standalone and pseudo-distributed setups with managed ZooKeeper
true: fully-distributed with unmanaged ZooKeeper Quorum (see hbase-env.sh)
</description>
vim regionservers
zhep-opay-temp-1.novalocal
zhep-opay-temp-2.novalocal
zhep-opay-temp-3.novalocal
zhep-opay-temp-4.novalocal
将hdfs配置文件链接到hbase
为了使用上面的配置:
<name>hbase.rootdir</name>
<value>hdfs://mycluster/user/hbase</value>
------------------------
ln /etc/hadoop/conf/core-site.xml /opt/module/hbase-2.1.3/conf/core-site.xml
ln /etc/hadoop/conf/hdfs-site.xml /opt/module/hbase-2.1.3/conf/hdfs-site.xml
ansible-book把/etc/profile 和scp把hbase文件夹copy到从节点
启动:
[root@zhep-opay-temp-1 conf]# start-hbase.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/module/hbase-2.1.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.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]
running master, logging to /opt/module/hbase-2.1.3/logs/hbase-root-master-zhep-opay-temp-1.novalocal.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/module/hbase-2.1.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
zhep-opay-temp-1.novalocal: running regionserver, logging to /opt/module/hbase-2.1.3/bin/../logs/hbase-root-regionserver-zhep-opay-temp-1.novalocal.out
zhep-opay-temp-2.novalocal: running regionserver, logging to /opt/module/hbase-2.1.3/bin/../logs/hbase-root-regionserver-zhep-opay-temp-2.novalocal.out
zhep-opay-temp-3.novalocal: running regionserver, logging to /opt/module/hbase-2.1.3/bin/../logs/hbase-root-regionserver-zhep-opay-temp-3.novalocal.out
zhep-opay-temp-4.novalocal: running regionserver, logging to /opt/module/hbase-2.1.3/bin/../logs/hbase-root-regionserver-zhep-opay-temp-4.novalocal.out
zhep-opay-temp-1.novalocal: SLF4J: Class path contains multiple SLF4J bindings.
zhep-opay-temp-1.novalocal: SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-1.novalocal: SLF4J: Found binding in [jar:file:/opt/module/hbase-2.1.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-1.novalocal: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
zhep-opay-temp-1.novalocal: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
zhep-opay-temp-2.novalocal: SLF4J: Class path contains multiple SLF4J bindings.
zhep-opay-temp-2.novalocal: SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-2.novalocal: SLF4J: Found binding in [jar:file:/opt/module/hbase-2.1.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-2.novalocal: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
zhep-opay-temp-2.novalocal: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
zhep-opay-temp-3.novalocal: SLF4J: Class path contains multiple SLF4J bindings.
zhep-opay-temp-3.novalocal: SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-3.novalocal: SLF4J: Found binding in [jar:file:/opt/module/hbase-2.1.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-3.novalocal: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
zhep-opay-temp-3.novalocal: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
zhep-opay-temp-4.novalocal: SLF4J: Class path contains multiple SLF4J bindings.
zhep-opay-temp-4.novalocal: SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-4.novalocal: SLF4J: Found binding in [jar:file:/opt/module/hbase-2.1.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
zhep-opay-temp-4.novalocal: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
zhep-opay-temp-4.novalocal: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
#检查,进入hbase shell
[root@zhep-opay-temp-1 conf]# hbase shell
查看节点信息
hbase(main):001:0> status
1 active master, 0 backup masters, 5 servers, 0 dead, 0.4000 average load
Took 0.3888 seconds
查看webUI,端口为16010
http://195.189.142.89:16010/master-status

jps:

hbase部署的更多相关文章
- 大数据【七】HBase部署
接着前面的Zookeeper部署之后,现在可以学习HBase了. HBase是基于Hadoop的开源分布式数据库,它以Google的BigTable为原型,设计并实现了具有高可靠性.高性能.列存储.可 ...
- Hadoop+Spark+Hbase部署整合篇
之前的几篇博客中记录的Hadoop.Spark和Hbase部署过程虽然看起来是没多大问题,但是之后在上面跑任务的时候出现了各种各样的配置问题.庆幸有将问题记录下来,可以整理出这篇部署整合篇. 确保集群 ...
- HBase部署与使用
HBase部署与使用 概述 HBase的角色 HMaster 功能: 监控RegionServer 处理RegionServer故障转移 处理元数据的变更 处理region的分配或移除 在空闲时间进行 ...
- Zookeeper + Hadoop + Hbase部署备忘
网上类似的文章很多,本文只是记录下来备忘.本文分四大步骤: 准备工作.安装zookeeper.安装hadoop.安装hbase,下面分别详细介绍: 一 准备工作 1. 下载 zookeeper.had ...
- 001.hadoop及hbase部署
一 环境准备 1.1 相关环境 系统:CentOS 7 #CentOS 6.x系列也可参考,转换相关命令即可. hadoop包:hadoop-2.7.0.tar.gz #下载官方地址:http://w ...
- hbase 部署
hbase的部署相对于java来说就比较简单啦,主要过程如下: 1.下载hbase最新的稳定版 2.拷贝到相应的目录 3.修改conf目录下的hbase-env.sh,设置java 和不适用内置的zo ...
- 1.4-1.5 HBase部署及基本使用
一.部署 1.准备 ##先用Apache hadoop ##之前的cdh 服务器先全部停掉 ##解压HBASE [root@hadoop-senior hbase]# tar zxf hbase-0. ...
- hbase部署经验与坑总结
1.本地单机部署hbase,想要使用独立zookeeper,不使用自带的 vim conf/hbase-env.sh export HBASE_MANAGES_ZK=false 设置不使用自带zook ...
- Hadoop及Hbase部署
原文转自:https://www.cnblogs.com/itzgr/p/10233932.html作者:木二 目录 一 环境准备 1.1 相关环境 1.2 网络环境 二 基础环境配置 2.1 配置相 ...
随机推荐
- 京东POP店铺使用京东物流切仓操作方法
首先进入京东物流工作台:https://wl.jdwl.com/ 在运营管理中,点击店铺商品 然后看截图操作
- 【leetcode】1255. Maximum Score Words Formed by Letters
题目如下: Given a list of words, list of single letters (might be repeating) and score of every charact ...
- webbrowser 修改浏览器版本的方法
http://blog.csdn.net/herogui/article/details/51982474
- conda退出base 环境
安装conda后取消命令行前出现的base,取消每次启动自动激活conda的基础环境 方法一: 每次在命令行通过conda deactivate退出base环境回到系统自动的环境 方法二 1,通过 ...
- vue实现v-model父子组件间的双向通信
首先讲清楚有个缺点:父页面若同时使用多个子组件,永远只会只能实现第一个双向驱动,我是新手,还在研究.如果有高手请指教,感谢! 子组件 <script> export default { m ...
- javascript中创建对象的方式及优缺点(一)
1. 简单方式创建对象 // 字面量方式创建对象 var person1 = { name: "xyc", age: 23, sayHi: function() { console ...
- poj 3625 (最小生成树算法)
Building Roads Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12203 Accepted: 3448 D ...
- 【杂题】[CodeForces 1172D] Nauuo and Portals【构造】
Description 有一个n*n的网格,你需要在上面设置一些传送门,传送门由两个配对的格子组成,从一个进入会立刻从另一个同一方向出来. 现在有n个人从第1列出发向右走,位于(i,1)的人要走到(r ...
- git多人参与的项目 -> 分支代码如何合并到主干
个人理解:合并分支时候就是当前分支,与别的分支先合并一遍,然后解决分支中存在的所有冲突,之后将本地分支代码提交到git远程仓库,之后切换主干分支 ,将主干分支与分支内容合并,解决冲突, 在提交主干分支 ...
- 六、smarty-缓存控制前的页面静态化原理
页面静态化可以实现优化服务,对大流量访问网站非常至关重要 为什么页面静态化, 1. 不去执行数据库连接 2. 不去执行SQL语句 设置按时间更新, 1. 按时间更新,如果缓存文件设置1小时 如下 ...