基于HBase的大数据平台负载均衡算法分析与优化
2019-06-07邵芳王勇
邵芳 王勇



摘 要:HBase原有负载均衡算法策略是保证每个Region Server的Region数目相同。但每个Region的访问并不均等,可能造成负载不均衡情况,产生热点数据,影响请求响应效率。部分Region会成为热点,导致一些Region Server负载过重。为提高HBase数据库整体性能,将数据热度因素考虑在内,使用预测方法设计HBase负载均衡算法,把预测数据的热度作为Region Server负载。实验表明,优化后的负载均衡算法可在一定程度上提高HBase数据库性能。
关键词:HBase;大数据;负载均衡;热点数据;预测
DOI:10. 11907/rjdk. 181331
中图分类号:TP312文献标识码:A文章编号:1672-7800(2019)001-0104-04
Abstract: In order to improve the performance of HBase database, the original load balancing algorithm of HBase is analyzed. The original algorithm strategy ensures that the number of Region per Region Server is the same, but because the access of each Region is not equal, it may cause the load imbalance, generate hot data, and affect the response efficiency of the request. Part of the Region will become a hot spot, which some Region Server overload. It is very important to consider the impact of the heat of the data on the load balancing of a distributed database. Therefore, the prediction method is used to design the HBase load balancing algorithm and predict the heat of the data as the load of the Region Server. The experiment shows that the optimized load balancing algorithm can improve the performance of HBase database.
0 引言
隨着互联网的迅猛发展,利用传统关系型数据库解决大规模数据集存在的问题引起广泛关注,NoSQL(Not Only SQL,NoSQL ,非关系型数据库)研究成为热点[1]。互联网产生的数据量增长迅速,对于海量数据的不断增长,要求系统具有良好的横向扩展性,集群技术能够解决此类问题[2]。集群之间能资源共享,控制任务分发调度性能,并且随着数据的增加进行扩展。
Apache HBase是开源分布式NoSQL数据库,HBase技术源于《Bigtable:一个结构化数据的分布式存储系统》这篇Google论文[3]。HBase作为一个分布式列存储数据库,因其高可用性、可扩展性等特征而被广泛应用。HBase和Hadoop无缝集成,利用HDFS实现数据的底层分布式存储[4]。HBase数据库是列式存储的数据库,表的列数可在建表后动态增加,对于无实际值的列不进行存储,节省空间。健康大数据平台使用HBase数据库,负载不均问题直接影响到整个集群的性能。随着大量数据的注入,HBase Region数目的增加或不均等地对Region Server访问[5],HBase通过负载均衡算法保证尽量均等地分配每个Region Server。……
