hadoop balancer hbase balancer

hbase的一次Not running balancer故障解决 在master的日志如下问题: 2013-11-19 06:24:35,134 DEBUG [h1,60000,1384804461419-BalancerChore] balancer.BaseLoadBalancer: Not running balancer because only 1 active regionserver(s) 2013-11-19 06:29:35,451 D 阅读详情

Hadoop 均衡器

Hadoop在运行过程中,其datanode的块会越来越不平衡,不平衡的集群会导致部分datanode相对更繁忙。

Hadoop的均衡器是一个守护进程。它会重新分配块,将块从忙碌的datanode移到相对空闲的datanode。同时坚持复本策略,将复本分散到不同机架,以降低数据损坏率。

集群均衡标准:每个datanode的使用率和集群的使用率非常接近,差距不超过给定的阀值。

datanode使用率:该节点上已使用的空间与空间总量之间的比率;

集群的使用率:集群中已使用的空间与集群的总空间总量之间的比率。

为了降低集群负荷、避免干扰其他用户,均衡器后台运行,并限制不同节点之间复制数据的带宽,默认值为1MB/s。

Hadoop的均衡器默认是关闭的,启动需要执行%start-balancer.sh,集群均衡后会自动停止。


HBase 负载均衡

HBase的均衡器默认五分钟执行一次,由 hbase.balancer.period属性设置。均衡器运行后会尝试均匀分配region到所有region服务器。

先确定一个region分配计划,然后开始移动region。

通过均衡器的开关类控制开启和关闭状态。

HBase的均衡器默认是开启的,并周期性运行。


下面是官网的解释说明:


Hadoop Balancer

Over time, the distribution of blocks across datanodes can become unbalanced. An unbalanced cluster can affect locality for MapReduce, and it puts a greater strain on the highly utilized datanodes, so it’s best avoided.

The balancer program is a Hadoop daemon that redistributes blocks by moving them from overutilized datanodes to underutilized datanodes, while adhering to the block replica placement policy that makes data loss unlikely by placing block replicas on different racks (see Replica Placement). It moves blocks until the cluster is deemed to be balanced, which means that the utilization of every datanode (ratio of used space on the node to total capacity of the node) differs from the utilization of the cluster (ratio of used space on the cluster to total capacity of the cluster) by no more than a given threshold percentage. You can start the balancer with:

% start-balancer.sh

The -threshold argument specifies the threshold percentage that defines what it means for the cluster to be balanced. The flag is optional; if omitted, the threshold is 10%. At any one time, only one balancer may be running on the cluster.

The balancer runs until the cluster is balanced, it cannot move any more blocks, or it loses contact with the namenode. It produces a logfile in the standard log directory, where it writes a line for every iteration of redistribution that it carries out. Here is the output from a short run on a small cluster (slightly reformatted to fit the page):

Time Stamp      Iteration#  Bytes Already Moved  ...Left To Move  ...Being Moved
Mar 18, 2009 5:23:42 PM  0                 0 KB        219.21 MB       150.29 MB
Mar 18, 2009 5:27:14 PM  1            195.24 MB         22.45 MB       150.29 MB
The cluster is balanced. Exiting...
Balancing took 6.072933333333333 minutes

The balancer is designed to run in the background without unduly taxing the cluster or interfering with other clients using the cluster. It limits the bandwidth that it uses to copy a block from one node to another. The default is a modest 1 MB/s, but this can be changed by setting the dfs.datanode.balance.bandwidthPerSec property in hdfs-site.xml, specified in bytes.


HBase Load Balancing

The master has a built-in feature, called the balancer. By default, the balancer runs every five minutes, and it is configured by the hbase.balancer.period property. Once the balancer is started, it will attempt to equal out the number of assigned regions per region server so that they are within one region of the average number per server. The call first determines a new assignment plan, which describes which regions should be moved where. Then it starts the process of moving the regions by calling the unassign() method of the administrative API iteratively.

The balancer has an upper limit on how long it is allowed to run, which is configured using the hbase.balancer.max.balancing property anddefaults to half of the balancer period value, or two and a half minutes.

You can control the balancer by means of the balancer switch: either use the shell’s balance_switch command to toggle the balancer status between enabled and disabled, or use the balanceSwitch() API method to do the same. When you disable the balancer, it no longer runs as expected.

The balancer can be explicitly started using the shell’s balancer command, or using the balancer() API method. The time-controlled invocation mentioned previously calls this method implicitly. It will determine if there is any work to be done and return true if that is the case. The return value of false means that it was not able to run the balancer, because either it was switched off, there was no work to be done (all is balanced), or something else was prohibiting the process. One example for this is the region in transition list (see Main page): if there is a region currently in transition, the balancer will be skipped.

Instead of relying on the balancer to do its work properly, you can use the move command and API method to assign regions to other servers. This is useful when you want to control where the regions of a particular table are assigned. See Region Hotspotting for an example.


HBase负载均衡的实现机制 阅读详情

相关推荐

5_HDFS常用操作指令及管理命令(权限、节点上下线、balancer、disk balancer)

2020/12/16 sunhaiqi@bonc.com.cn 文章目录HDFS常用操作指令及管理命令(权限、节点上下线、balancer、disk balancer)一、HDFS权限1.1、HDFS权限简介1.2、HDFS基本权限管理1.2.1、初始目录权限1.2.2、修改默认权限配置umask1.3、HDFSACL权限管理1.3.1、开启HDFS ACL1.3.2、HDFS ACLshell命令1.3.3、HDFS ACL权限实体类别1.3.4、HDFS ACL权限生效的算法规则二、节点上下线2.1、黑

nothair的博客 1036

hadoop的balancer

其实很多人都知道hadoop自带一个hadoop balancer的功能,作用于让各个datanode之间的数据平衡. 比如说node-A有100GB数据,占用磁盘99%空间; 而node-B只有10GB数据占用磁盘10%空间~ 那么当我们以hdfs身份运行hadoop balance的时候,hadoop将会平衡这两个node之间的数据. 至于多少叫做平衡,hadoop的d

每天积累一点点 1047

[Hadoop]Hadoop添加节点datanode

部署hadoop 和普通的datanode一样。安装jdk,ssh 修改host 和普通的datanode一样。添加namenode的ip 修改namenode的配置文件conf/slaves 添加新增节点的ip或host 在新节点的机器上,启动服务 [root@slave-004 hadoop]# ./bin/hadoop-daemon.sh start datanode [root@sl

SmartSi 1427

hadoop balancer

一、balancer是当hdfs集群中一些datanodes的存储要写满了或者有空白的新节点加入集群时,用于均衡hdfs集群磁盘使用量的一个工具。这个工具作为一个应用部署在集群中,可以由集群管理员在一个live的cluster中执行。 语法: To start: start-balancer.sh 用默认的10%的阈值启动balanc...

weixin_30236595的博客 687

【精】HDFS Balancer原理、参数详解

【精】HDFS Balancer原理、参数详解

LifeIsGood 3288

10BASE-T1S协议中的PLCA机制:实现无碰撞网络传输的关键

本文深入解析了10BASE-T1S协议中的PLCA(物理层冲突避免)机制。作为IEEE 802.3cg标准的关键部分,PLCA通过循环调度与机会传递,从根源上避免了网络碰撞,为工业与汽车等场景提供了确定性的低延迟传输保障,是实现可靠实时通信的核心技术。

weixin_29250403的博客 209

HBase源码阅读(一) balancer

最近开始搞hbase,大概看书感觉能明白架构,但是很多细节还是需要看代码才能明白,其中balancer模块是一个比较独立的模块,而且也是分布式系统中非常重要的模块,同时在我们自己的项目中也有调度相关的模块,看看hbase有无值得学习和借鉴的。不多逼逼,直接上代码。 在HMaster的balancer()方法中会调用balancer,可以看到balancer会根据当前负载状态生成一个balance plan,但是具体对于plan的执行是由assignmentManager来负责的,这个模块代码先不讨论。 //

东东儿的博客 3621

27-eMMC电路设计

eMMC硬件电路设计

weixin_66510961的博客 4005

hbase balance命令走过的坑

hbase balance命令走过的坑

u011250186的博客 751

中颖单片机SH79F3213正弦波矢量的电动车小毛驴控制器量产资料

中颖单片机SH79F3213正弦波矢量的电动车小毛驴控制器量产资料 中颖单片机SH79F3213 制作的电动车小毛驴控制器量产资料,已量产十几万片,拿到手即可量产 1、提供原理图 2、提供PCB图 3、提供C语言源代码程序 4、提供清单 ...

m0_69036675的博客 4525

Unity URP半透明物体渲染避坑指南:双面渲染与深度写入的实战技巧

本文深入探讨了Unity URP中半透明物体自交叠渲染问题的核心根源与解决方案。针对模型自身交叠导致的排序错误,文章提供了双面渲染与深度写入两种实战技巧,详细分析了其实现原理、性能开销及适用场景,帮助开发者根据项目需求选择最优方案,有效提升玻璃、水体等材质的视觉表现。

sunny的博客 545

HBase Balancer失败日志报错 ERROR org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler

现象 HBase shell下面打开Balance并手动执行Balancer很快结束,显示为false(此时balance_switch为true) hbase(main):007:0* balancer false 查看RegionServer日志有如下报错信息, 2020-07-08 16:49:01,821 INFO org.apache.hadoop.hbase.coordination.ZkOpenRegionCoordination: Opening of region {ENCODED

数据源的港湾 1268

MacBook 上 LaTeX 环境搭建:从 Mactex 到 Sublime Text 与 Skim 的保姆级配置流程

本文详细介绍了在MacBook上搭建LaTeX环境的完整流程,从Mactex安装到Sublime Text与Skim的配置优化。涵盖基础环境准备、编辑器设置、PDF预览同步等关键步骤,帮助用户快速建立高效的LaTeX工作流,特别适合学术写作和技术文档创作。

weixin_30824599的博客 678

hadoop和hbase节点添加和单独重启

有时候hadoop或hbase集群运行时间久了后,某些节点就会失效,这个时候如果不想重启整个集群(这种情况在很多情况下已经不被允许),这个时候可以单独重启失效节点。 HADOOP: hadoop中重启单节点的方法和增加新节点其实是一样的。 1、我们先看下如何了解hadoop机器的情况,可以用命令: hadoop dfsadmin -report 查看集群容量情...

weixin_34375233的博客 110

【AutoSAR】【BootLoader】AutoSAR Bootloader 原理与流程

目录 一、HIS规范 二、BOOTLOADER软件架构 三、烧写流程 一、HIS规范 国外整车厂意识到在线刷新ECU的重要性,由奥迪公司、宝马公司、戴姆勒公司、保时捷公司、大众公司成立一个委员会,名为HIS委员会,专门负责帮助汽车制造商掌握微处理器控制单元软件和质量保证领域的原理和方法; HIS Bootloader的主要功能是通过标准的通信接口对ECU进行再编程 。 HIS Bootloader的软件设计基于AUTOSAR体系架构、ISO14229、ISO15765-2、HI...

专注汽车软件开发、AutoSAR、车载以太网、SOA、EE架构。 5247

AI产品经理面试宝典第94天:RAG知识库构建与预处理策略面试指南

本文深入解析RAG知识库构建的核心挑战与预处理策略,涵盖文档格式转换、问答对生成及自动化测试全流程,为AI产品经理提供面试必备的实战方法论与避坑指南,助你精准应对技术深度类问题。

打造全国最全的AI Agent开发知识领域的博客 311

Hadoop和Hbase动态扩展

环境: Centos7.2 64位 hadoop-2.6.0-cdh5.5.2 hbase-1.0.0-cdh5.5.2 jdk1.8.0_91 master:192.168.205.153 slave1:192.168.205.154 slave2:192.168.205.155 新增节点slave3:192.168.205.156 一、hadoop添加节点

小强签名设计 的博客 2197

提示词驱动的智能合同生成与审核

第1章:核心概念与背景 1.1.1 问题背景 1.1.1.1 合同生成与审核的需求 合同作为商业和法律领域中的基本工具,其生成和审核过程至关重要。传统的合同生成往往依赖于法律专业人士的手工撰写,这不仅耗时耗力,而且容易出现错误。此外,合

AI天才研究院 999

Hadoop + Spark + Hbase (二)

环境搭建及接口调用一、基础环境搭建1.节点基础网络配置2.配置 SSH 免密码登录3.安装 JDK、Scala4.配置完全分布式的 Hadoop5.配置完全分布式的 HBase6.配置 StandAlone 模式的 Spark7.安装和配置 MySQL8.Hbase操作二、存储接口设计及使用说明1.存储接口设计2.存储数据请求标准json格式3.存储接口调用4.存储返回状态码5.参数属性表、设备站...

Courage-Hu的专栏 584

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

Welcome to Apache HBase( 七,habse》默认配置)

7.默认配置 7.1。hbase-site.xml和hbase-default.xml 就像在Hadoop中为hdfs-site.xml文件添加特定于站点的HDFS配置一样,对于HBase,站点特定的自定义将进入文件conf / hbase-site.xml。有关可配置属性的列表,请参阅下面的hbase默认配置或查看src / main / resources中HBase源代码中的原始h...

hxiaowang的博客 3668

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

HBase负载均衡之集群负载的评分方法

HMater负责把region均匀到各个region server 。hmaster中有一个线程任务是专门处理负责均衡的,默认每隔5分钟执行一次。每次负载均衡操作可以分为两步: 生成负载均衡计划表 Assignment Manager 类执行计划表

浩先生的博客 3789

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

优化Hadoop Balancer运行速度

  1. 修改dfs.datanode.max.transfer.threads = 4096 (如果运行hbase的话建议为16384),指定用于在DataNode间传输block数据的最大线程数,老版本的对应参数为dfs.datanode.max.xcievers 2. 修改dfs.datanode.balance.bandwidthPerSec  = 52428800,指定DataNod...

数据之路 7316

Hadoop Balancer运行速度优化

1.修改dfs.datanode.max.transfer.threads = 4096 (如果运行hbase的话建议为16384),指定用于在DataNode间传输block数据的最大线程数,老版本的对应参数为dfs.datanode.max.xcievers 2.修改dfs.datanode.balance.bandwidthPerSec  = 31457280 ,指定DataNode用

TURING.DT 8857

优化Hadoop Balancer平衡的速度

之前我在博客中介绍了HDFS的Block数据balancer重分布实战内容:http://blog.youkuaiyun.com/jiangshouzhuang/article/details/51879102 本篇文章我们再来简单介绍一下优化Hadoop Balancer平衡的速度涉及到的几个重要参数。1.  dfs.datanode.max.transfer.threads修改dfs.datanode.m

DataFlow范式 6179

HBase 表级balancer配置

转载来自:https://blog.youkuaiyun.com/xiao_jun_0820/article/details/28648621  今天测试用hbaseadmin.split手动对region进行拆分,拆分完之后,并没有和我想的那样region均衡分布到3个regionserver上去。感觉很莫名,说好的balancer呢,怎么不起作用,于是我手工执行了一下hbaseadmin.balance...

那又怎样?的博客 3341
上一篇: HBase Full GC宕机
下一篇: Java记录 -41- IDE开发工具
架构师的清醒
博客等级 码龄14年 291粉丝 397原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值