AirJD 焦点
AirJD

没有录音文件
00:00/00:00
加收藏

HBase在阿里搜索领域的应用与扩展 by 雨田

发布者 nosql
发布于 1452648609472  浏览 5221 关键词 HBase 
分享到

第1页

HBase在阿里搜索领域的 应用与扩展



第2页

Self-introduction

• 徐斌,花名“雨田”,阿里巴巴搜索事业部,搜索研发专家 • 2009年,本科毕业于华中科技大学,软件工程专业 • 主要工作领域:搜索抓取系统,搜索存储平台 • 微博:淘宝雨田 • 邮箱:yutian.xb@taobao.com



第3页

Agenda

1. HBase in Ali-Search 2. Improvements & Maintenance 3. Extensional Projects 4. Future 5. Q & A



第4页

HBase in Ali-Search



第5页

Upgrade History



2010/08



• HBase-0.20.X



2012/04



• HBase-0.92.X



2013/03



• HBase-0.94.X



• HBase-0.98.X (Current)

2014/08



• HBase-1.X (Future)

2015/06



第6页

Who is using HBase?



第7页

Scenario 1 – Taobao Search

Taobao data: billions of items Tmall data: hundreds of millions of items



Taobao MySQL



Inc Syncer (iStream)

Total Syncer (M/R Job)



HBase



HQueue

Inc Dump (iStream)

Total Dump (M/R Job)



Search Engine



第8页

Scenario 2 – PORA

PORA: Personal Offline Real-time Analyze User log data: tens of billions of records per day



iStream on YARN



HQueue



User Log



Pora sync



auction user



Taobao MySQL



HBase



iStream on YARN Pora user

Pora auction



Search Engine



第9页

Scenario 3 – Web Crawling

Web data: tens of billions of pages

ETL Data Mining



Web



Fetcher



HBase



Inc Dump



Search



Engine



Scheduler



Total Dump



第10页

Improvements & Maintenance



第11页

Lower Disk I/O

Generate HFile directly onto the node which holds the HDFS replica of target region, then bulkload it with high locality, saving the I/O of major compaction. (HBase-12596)

HBase



HFileOutput Format



Region A

BLK A1 BLK A2



Region B

HDFS BLK B1

BLK B2



Region C

BLK C1 BLK C2



第12页

Limit Bandwidth



Remote Read/Write Requests Scan Get Put Delete



Region Server Region A



Traffic Controller



Region B Region C



……



第13页

Offline Region Merge

Online region merge mechanism is so slow that we need to find another way to merge thousands (maybe tens of thousands ) of regions at a time.

1. Disable the table.

2. Make a region merging plan, filter gaps and splitting regions.

3. Merge adjacent regions and update META info concurrently.

4. Enable the table.

5. Make a hbase status check (hbck).



第14页

Incremental Trigger



第15页

Region Split Policy



• Set a constant limit for each family, if not, use the region max size limit

instead. Region split will be triggered if any family reaches its size limit. • The split point is determined by the family who exceeds the most

proportion of its size limit.



For example: SizeOf(F1) = 5M, SizeOf(F2) = 15M, SizeOf(F3) = 10M LimitOf(F1)= 10M, LimitOf(F2) = 14M, LimitOf(F3) = 8M



Original Region Split Policy



New Region Split Policy



F1 F2 F3



F1 F2 F3



第16页

Cluster Availability

The strategy we find and deal with sick Region Server.

Phase 1: Region probe (< 3 min) Phase 2: Save logs (< 30 sec) Phase 3: RS shutdown (< 3 min) Phase 4: Force kill RS (< 30 sec) Phase 5: Phone alarm(< 30 sec)



第17页

Other Optimizations

 Enhanced simple balance strategy  Enhanced rolling upgrade  Customized tableInputFormat  More ganglia metrics for client requests



第18页

Extensional Projects



第19页

Overview

OpenTSDB - an open-source, distributed time series database Phoenix - a SQL skin over HBase HQueue - a distributed and persistent message-oriented middleware HTunnel - a WAL tracker and deliverer for HBase

User Applications



OpenTSDB Phoenix



HQueue



HBase



HTunnel



HDFS



第20页

OpenTSDB



第21页

Phoenix



第22页

What’s HQueue?

HQueue is a distributed and persistent message-oriented middleware based on HBase.



第23页

HQueue in HBase



第24页

HQueue Subscription



第25页

Why HTunnel?



第26页

HTunnel DAG



第27页

Future

 HBase-1.X (Multi-WAL HBASE-5699)  HBase-2.X (HBase Read HA HBASE-10070)  Tiered Storage Support in HDFS (HDFS-2832)  Phoenix with Merged Index (PHOENIX-1801)



支持文件格式:*.pdf
上传最后阶段需要进行在线转换,可能需要1~2分钟,请耐心等待。