基于 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 包含三部分内容:
    1. Storage Account: All access is done through a storage account
    2. 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.
    3. 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>

验证:


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的更多相关文章

  1. hbase集群配置

    说明 安装 配置 启动 网页效果 一点废话 本文介绍hbase集群配置 说明 hbase想正确配置成功的前提是,你必须知道hadoop集群和zookeeper集群是如何配置的 安装 下载地址 http ...

  2. HBase 学习之路(四)—— HBase集群环境配置

    一.集群规划 这里搭建一个3节点的HBase集群,其中三台主机上均为Regin Server.同时为了保证高可用,除了在hadoop001上部署主Master服务外,还在hadoop002上部署备用的 ...

  3. HBase 系列(四)—— HBase 集群环境配置

    一.集群规划 这里搭建一个 3 节点的 HBase 集群,其中三台主机上均为 Regin Server.同时为了保证高可用,除了在 hadoop001 上部署主 Master 服务外,还在 hadoo ...

  4. Hadoop(25)-高可用集群配置,HDFS-HA和YARN-HA

    一. HA概述 1. 所谓HA(High Available),即高可用(7*24小时不中断服务). 2. 实现高可用最关键的策略是消除单点故障.HA严格来说应该分成各个组件的HA机制:HDFS的HA ...

  5. 高可用Hadoop平台-HBase集群搭建

    1.概述 今天补充一篇HBase集群的搭建,这个是高可用系列遗漏的一篇博客,今天抽时间补上,今天给大家介绍的主要内容目录如下所示: 基础软件的准备 HBase介绍 HBase集群搭建 单点问题验证 截 ...

  6. hadoop之完全分布式集群配置(centos7)

    一.基础环境 现在我们有两台虚拟机了,再克隆两台: 克隆好之后需要做三件事:1.更改主机名称 2.修改ip地址 3.将ip地址和对应的主机号加入到/etc/hosts文件中 1.永久修改主机名 hos ...

  7. debian下 Hadoop 1.0.4 集群配置及运行WordCount

    说明:我用的是压缩包安装,不是安装包 官网安装说明:http://hadoop.apache.org/docs/r1.1.2/cluster_setup.html,繁冗,看的眼花...大部分人应该都不 ...

  8. hadoop分布式安装及其集群配置笔记

    各机器及角色信息: 共10台机器,hostname与ip地址映射在此不做赘述.此为模拟开发环境安装,所以不考虑将NameNode和SecondaryNameNode安装在同一台机器. 节点 角色 na ...

  9. Hadoop HA on Yarn——集群配置

    集群搭建 因为服务器数量有限,这里服务器开启的进程有点多: 机器名 安装软件 运行进程 hadoop001 Hadoop,Zookeeper NameNode, DFSZKFailoverContro ...

随机推荐

  1. Team Foundation API - 编程访问 WorkItem

    Team Foundation Server (TFS)工具的亮点之一是管理日常工作项, 工作项如Bug, Task,Task Case等. 使用TFS API编程访问TFS服务器中的工作项, 步骤如 ...

  2. c语言 如何判断是不是 可显字符

    c语言 如何判断是不是 可显字符int isprint(int c)若可显示返回1,否则0:要包含头文件ctype.h

  3. CoreOS Linux available in China

    CoreOS Linux 竭诚服务中国用户 今天,我们宣布一个令人振奋的消息 - CoreOS Linux 开源版本正式向中国地区提供服务!国内的用户们现在可以使用安全.自动的 CoreOS Linu ...

  4. java NIO-我们到底能走多远系列(39)

    献给各位: Satisfied MindRed Hayes and Jack RhodesHow many times have you heard someone say,"If I ha ...

  5. Standard C++ Programming: Virtual Functions and Inlining

    原文链接:http://www.drdobbs.com/cpp/standard-c-programming-virtual-functions/184403747 By Josée Lajoie a ...

  6. UVa 1388 - Graveyard

    题意:有一个周长为10000的圆上等距分布着n个雕塑,现在又加入m个雕塑,位置随意,希望n+m个雕塑仍然均匀分布.这就要移动其中一些雕像,求移动的最小距离. 这个题的方法很巧妙,首先将整个圆分成(m+ ...

  7. Sprint第二个冲刺(第五天)

    一.Sprint 计划会议: 容杰龙继续完善昨天的SQLite修改数据操作,待全部操作完善后交给炜杰进行布局规范和整合. 二.Sprint周期:   看板: 燃尽图:

  8. mysql in和or查询效率

    http://blog.chinaunix.net/uid-20639775-id-3416737.html 上面链接博主的文章分析结论: or在没有索引的情况下呈指数增长,in则是正常递增. or的 ...

  9. install kinect driver for ARM---38

    原创博客:转载请标明出处:http://www.cnblogs.com/zxouxuewei/ The video describes connecting a Microsoft Kinect to ...

  10. html部分---通用标签与属性;

    body的属性: bgcolor页面背景色:text文字颜色:topmargin上页边距:leftmargin左页边距:rightmargin右页边距:bottomargin下页边距: src是引用过 ...