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>
- <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>
- <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>
- <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>
- <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>
- <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 ...
随机推荐
- HDU 1054
http://acm.hdu.edu.cn/showproblem.php?pid=1054 二分图最少顶点覆盖,模板题,双向边最后结果/2 #include <iostream> #in ...
- inno安装卸载时检测程序是否正在运行卸载完成后自动打开网页-代码无效
inno安装卸载时检测程序是否正在运行卸载完成后自动打开网页-代码无效 inno setup 安装卸载时检测程序是佛正在运行卸载完成后自动打开网页-代码无效 --------------------- ...
- D - Charm Bracelet 背包问题
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Pra ...
- LeetCode Median of Two Sorted Arrays 找中位数(技巧)
题意: 给两个有序(升or降)的数组,求两个数组合并之后的中位数. 思路: 按照找第k大的思想,很巧妙.将问题的规模降低,对于每个子问题,k的规模至少减半. 考虑其中一个子问题,在两个有序数组中找第k ...
- Day06_面向对象第一天
1.JAVA中的参数传递问题(掌握) 基本类型 形式参数的改变对实际参数没有影响 基本类型的实际参数和形式参数可以看作两个变量,这两个变量分别操作各自的数据,所以互不影响 引用类 ...
- 如何使用SnpEff 对SNP结果进行分析
SnpEff is a variant annotation and effect prediction tool. It annotates and predicts the effects of ...
- (实用篇)php精确的统计在线人数的方法
这是一个非常精确的,通过php实现统计在线人数的方法,想知道怎么实现的请耐心阅读. <?php $filename='online.txt';//数据文件 $cookiename='VGOTCN ...
- poj 1840 暴力+标记
Description Consider equations having the following form: a1x1 3+ a2x2 3+ a3x3 3+ a4x4 3+ a5x5 3=0 T ...
- SQLITE SUBSTR
insert into t_user values(4,'u1234567890'); sqlite> select substr(username,1,1) from t_user where ...
- 3-1 rpm包命名规则
1.RPM包的来源 <1>RPM包在系统光盘中 ---------------------------------------------------------------------- ...