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 ...
随机推荐
- exit(-1)或者return(-1)为什么shell得到的退出码是255?
写一段hello world: // filename: main.c #include <stdio.h> int main(void) { printf("hello wol ...
- 四、CCSprite
在介绍CCSprite之前,先要理解游戏开发中的一个核心概念:精灵.精灵也称为游戏对象,它可以用来表示游戏中的任何物体,比如敌人.子弹.甚至是一个背景图片.一段文字.CCSprite可以说是在coco ...
- window8快捷键
win8中有很多比较重要的快捷键经常忘记: cmd快捷键:win+x; 截图工具:win+q; 添加环境变量:右键点击左下角window图标; 添加定时任务:右键点击计算机管理->任务计划程序.
- 博客引索 - imsoft.cnblogs
Java C Delphi 日常工具 图片处理 视频处理 系统工具 知识经验 奇思妙想 网站推荐
- Python 结巴分词
今天的任务是对txt文本进行分词,有幸了解到"结巴"中文分词,其愿景是做最好的Python中文分词组件.有兴趣的朋友请点这里. jieba支持三种分词模式: *精确模式,试图将句子 ...
- js 下载文件 window.location.href
window.location.href ="../../pages2/assessmentplan/exportPointAsessment.do?planId="+planId ...
- left join测试验证之一
$ sqlite3 a.dbSQLite version 3.8.1 2013-10-17 12:57:35Enter ".help" for instructionsEnter ...
- 论XCODE工程里使用的宏定义.
在XCODE开发过程中,经常会遇到引用头文件,引用库路径的问题,如果不是直接的源码引入,则需要在工程中增加设置.虽然现在有了Pod这类集合管理工具,但有时为了一个很小的lib引入Pod这尊大神还是有点 ...
- 滚动条滚动事件 js
<div class="xiangxix"> <ul> <li class=&qu ...
- eoe资料
-------------------------------https://github.com/waylau/vpngate-mirrors FQ软件.方法 android优化: http: ...