hadoop(四): 本地 hbase 集群配置 Azure Blob Storage
基于 HDP2.4安装(五):集群及组件安装 创建的hadoop集群,修改默认配置,将hbase 存储配置为 Azure Blob Storage
目录:
- 简述
- 配置
- 验证
- FAQ
简述:
- hadoop-azure 提供hadoop 与 azure blob storage 集成支持,需要部署 hadoop-azure.jar 程序包,在HDP2.4 安装包中已默认提供,如下图:

- 配置成功后,读写的数据都存储在 Azure Blob Storage account
- 支持配置多个 Azure Blob Storage account, 实现了标准的 Hadoop FileSystem interface
- Reference file system paths using URLs using the wasb scheme.
- Tested on both Linux and Windows. Tested at scale.
- Azure Blob Storage 包含三部分内容:
- Storage Account: All access is done through a storage account
- Container: A container is a grouping of multiple blobs. A storage account may have multiple containers. In Hadoop, an entire file system hierarchy is stored in a single container. It is also possible to configure multiple containers, effectively presenting multiple file systems that can be referenced using distinct URLs.
- Blob: A file of any type and size. In Hadoop, files are stored in blobs. The internal implementation also uses blobs to persist the file system hierarchy and other metadata
配置 :
- 在 china Azure 门户(https://manage.windowsazure.cn) 创建一个 blob storage Account, 如下图命名:localhbase

- 配置访问 Azure blob storage 访问证书及key以及切换文件系统配置,本地 hadoop core-site.xml 文件,内容如下
<property>
<name>fs.defaultFS</name>
<value>wasb://localhbase@localhbase.blob.core.chinacloudapi.cn</value>
</property>
<property>
<name>fs.azure.account.key.localhbase.blob.core.chinacloudapi.cn</name>
<value>YOUR ACCESS KEY</value>
</property> 在大多数场景下Hadoop clusters, the core-site.xml file is world-readable,为了安全起见,可通过配置将Key加密,然后通过配置的程序对key进行解密,此场景下的配置如下(基于安全考虑的可选配置):
<property>
<name>fs.azure.account.keyprovider.localhbase.blob.core.chinacloudapi.cn</name>
<value>org.apache.hadoop.fs.azure.ShellDecryptionKeyProvider</value>
</property>
<property>
<name>fs.azure.account.key.localhbase.blob.core.chinacloudapi.cn</name>
<value>YOUR ENCRYPTED ACCESS KEY</value>
</property>
<property>
<name>fs.azure.shellkeyprovider.script</name>
<value>PATH TO DECRYPTION PROGRAM</value>
</property>Azure Blob Storage interface for Hadoop supports two kinds of blobs, block blobs and page blobs;Block blobs are the default kind of blob and are good for most big-data use cases, like input data for Hive, Pig, analytical map-reduce jobs etc
Page blob handling in hadoop-azure was introduced to support HBase log files. Page blobs can be written any number of times, whereas block blobs can only be appended to 50,000 times before you run out of blocks and your writes will fail,That won’t work for HBase logs, so page blob support was introduced to overcome this limitation
Page blobs can be up to 1TB in size, larger than the maximum 200GB size for block blobs
In order to have the files you create be page blobs, you must set the configuration variable fs.azure.page.blob.dir to a comma-separated list of folder names
<property>
<name>fs.azure.page.blob.dir</name>
<value>/hbase/WALs,/hbase/oldWALs,/mapreducestaging,/hbase/MasterProcWALs,/atshistory,/tezstaging,/ams/hbase</value>
</property>
验证:
- 上面的参数配置均在 ambari 中完成,重启参数依赖的服务
命令: hdfs dfs -ls /hbase/data/default 如下图, 没有数据

- 参见 HBase(三): Azure HDInsigt HBase表数据导入本地HBase 将测试表数据导入,完成后如下图:

- 命令:./hbase hbck -repair -ignorePreCheckPermission
- 命令: hbase shell
- 查看数据,如下图,则OK

- 用我们自己开发的查询工具验证数据,如下图,关于工具的开发见下一章

- 参考资料: https://hadoop.apache.org/docs/current/hadoop-azure/index.html
FAQ
- ambari collector不要与regionserver一台机器
- 配置ha一定要在更改数据目录到wasb之前
- hadoop core-site.xml增加以下配置,否则mapreduce2组件会起不来,(注意impl为小写)
<property>
<name>fs.AbstractFileSystem.wasb.impl</name>
<value>org.apache.hadoop.fs.azure.Wasb</value>
</property> 本地自建集群,配置HA,修改集群的FS为 wasb, 然后将原hbase集群物理文件目录copy至新建的blob storage, 此时,在使用phoenix插入带有索引的表数据时出错,修改hbase-site.xml配置如下:
<property>
<name>hbase.regionserver.wal.codec</name>
<value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
</property>
hadoop(四): 本地 hbase 集群配置 Azure Blob Storage的更多相关文章
- hbase集群配置
说明 安装 配置 启动 网页效果 一点废话 本文介绍hbase集群配置 说明 hbase想正确配置成功的前提是,你必须知道hadoop集群和zookeeper集群是如何配置的 安装 下载地址 http ...
- HBase 学习之路(四)—— HBase集群环境配置
一.集群规划 这里搭建一个3节点的HBase集群,其中三台主机上均为Regin Server.同时为了保证高可用,除了在hadoop001上部署主Master服务外,还在hadoop002上部署备用的 ...
- HBase 系列(四)—— HBase 集群环境配置
一.集群规划 这里搭建一个 3 节点的 HBase 集群,其中三台主机上均为 Regin Server.同时为了保证高可用,除了在 hadoop001 上部署主 Master 服务外,还在 hadoo ...
- Hadoop(25)-高可用集群配置,HDFS-HA和YARN-HA
一. HA概述 1. 所谓HA(High Available),即高可用(7*24小时不中断服务). 2. 实现高可用最关键的策略是消除单点故障.HA严格来说应该分成各个组件的HA机制:HDFS的HA ...
- 高可用Hadoop平台-HBase集群搭建
1.概述 今天补充一篇HBase集群的搭建,这个是高可用系列遗漏的一篇博客,今天抽时间补上,今天给大家介绍的主要内容目录如下所示: 基础软件的准备 HBase介绍 HBase集群搭建 单点问题验证 截 ...
- hadoop之完全分布式集群配置(centos7)
一.基础环境 现在我们有两台虚拟机了,再克隆两台: 克隆好之后需要做三件事:1.更改主机名称 2.修改ip地址 3.将ip地址和对应的主机号加入到/etc/hosts文件中 1.永久修改主机名 hos ...
- debian下 Hadoop 1.0.4 集群配置及运行WordCount
说明:我用的是压缩包安装,不是安装包 官网安装说明:http://hadoop.apache.org/docs/r1.1.2/cluster_setup.html,繁冗,看的眼花...大部分人应该都不 ...
- hadoop分布式安装及其集群配置笔记
各机器及角色信息: 共10台机器,hostname与ip地址映射在此不做赘述.此为模拟开发环境安装,所以不考虑将NameNode和SecondaryNameNode安装在同一台机器. 节点 角色 na ...
- Hadoop HA on Yarn——集群配置
集群搭建 因为服务器数量有限,这里服务器开启的进程有点多: 机器名 安装软件 运行进程 hadoop001 Hadoop,Zookeeper NameNode, DFSZKFailoverContro ...
随机推荐
- 第三个Sprint冲刺第二天 最终篇
一.例会人员:李泳江,邵家文,周伟雄,谢洪跃 日期:6月21号 例会内容: 1.完成表格任务 编号 名称 时间 已用时间 是否完成 1 画出算法流程图 4小时 4小时 完成 2 界面设计 5小时 ...
- TC HTB r2q
HTB: quantum of class 10001 is big. Consider r2q change. 根据HTB的官方文档显示,quantum是在可以“借”的情况下,一次可以“借”多少,并 ...
- 如何禁用ListView中的选中效果
有的时候,我们希望ListView没有选中效果. 导致选中效果出现可能有两方面的原因: 1.每一行View自身可能有选中效果,可以将它的背景设置为透明 2.ListView有一个listSelecto ...
- CentOS 6.2 OpenVPN 搭建
一.yum 安装. 二.下载 easy-rsa 3.0 三.生成根证书.服务器.客户端证书.ta 生成流程: wget -c https://github.com/OpenVPN/easy-rsa/a ...
- ubuntu13 安装并配置ssh,交换密钥
1.下载安装sudo apt-get install ssh,若出现问题,可选择安装openssh-server,或ssh-server等 2.启动ssh,命令:sudo /etc/init.d/ss ...
- Sprint第二个冲刺(第三天)
一.Sprint 计划会议: 今天我们召开了第二个Sprint的第三次会议,会议上我们把各自完成的情况进行了一次总结,现在主界面和美化按钮.增添图片的功能已经完成了,Doing里面的其他 ...
- Codeforces Round #260 (Div. 2) A B C 水 找规律(大数对小数取模) dp
A. Laptops time limit per test 1 second memory limit per test 256 megabytes input standard input out ...
- Codeforces Round #111 (Div. 2)
Codeforces Round #111 (Div. 2) C. Find Pair 题意 给\(N(N \le 10^5)\)个数,在所有\(N^2\)对数中求第\(K(K \le N^2)\)对 ...
- C/C++程序员必须熟练应用的开源项目(转-清风小阁)
作为一个经验丰富的C/C++程序员, 肯定亲手写过各种功能的代码, 比如封装过数据库访问的类, 封装过网络通信的类,封装过日志操作的类, 封装过文件访问的类, 封装过UI界面库等, 也在实际的项目中应 ...
- php配置伪静态的方法
mod_rewrite是Apache的一个非常强大的功能,它可以实现伪静态页面.下面我详细说说它的使用方法 .检测Apache是否支持mod_rewrite 通过php提供的phpinfo()函数查看 ...