1、HUAWEI TECHNOLOGIES CO., LTD. Slide title :40-47pt Slide subtitle :26-30pt Color:white Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial HBase Secondary Index Anoop Sam John HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font
2、: FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following
3、 nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Huawei Hadoop R&D In a Glance Secondary Index in HBase HDFS NN HA (Hadoop-2) Bookke
4、eper as shared storage for NN HA (Hadoop-2) HDFS NN HA (Hadoop-1) MapReduce ResourceManager HA (Hadoop-2 / YARN) MapReduce JobTracker HA (Hadoop-1) Hive HA Hadoop Development Raised over 650 defects since Jan11 Fixed over 500 defects since Jan11, and contributed back to community. Stabilization Page
5、 2 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners
6、: Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standar
7、d”. Senior Tech Lead in Huawei R&D centre Bangalore Active contributor in Apache HBase community Active member in HBase dev/user mailing list Working with HBase and Hive Who am I Page 3 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font
8、to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an
9、example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Master, Region servers Table split into regions Columnar storage, Column family Memstore, Hfiles in DFS Hfiles lo
10、gically split into smaller blocks, data write/read as blocks HBase Recap Page 4 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corpo
11、rate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color g
12、roup per slide. For specific usage details, refer to the “Typesetting Standard”. No indexing available in HBase Scans with conditions on column value on huge sparse data. Filter usage Scan throughput very less Timeouts at client side and lease expiry Motivation Page 5 HUAWEI TECHNOLOGIES CO., LTD. S
13、lide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field
14、-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Index table Persist index data
15、 in separate table Co-processor based design 100% server side solution Region wise indexing with collocation 1-1 mapping with actual table and index table regions Region collocation using custom Load balancer Overall Solution Page 6 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B
16、0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes
17、. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Secondary Index Architecture Client Ext allows to specify index de
18、tails while table create Custom balancer do collocation Coprocessor handles the index data Page 7 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt
19、 Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use
20、one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Table creation Regions collocation Master Balancer RS1 RS2 Client Create table With regions R1 A B R2 B C R1 A B R2 B C Index table Actual table Page 8 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35p
21、t Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or
22、 partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Put operation Table tab1 column family cf1 Index
23、 idx1, cf1:c1 and idx2, cf1:c2 Index table tab1_idx Region Server Client Put tab1, abd, cf1:c1 , 5 cf1:c2 , Z1 R1 User Table R2 Index Table aa ad aa ad Coprocessor Index table rowkey = region startkey + index name + indexed column value + user table rowkey One index table per user table All index da
24、ta goes to same index table Put tab1_idx, aaidx15abd Put tab1_idx, aaidx2Z1abd Page 9 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black
25、 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design c
26、olor group per slide. For specific usage details, refer to the “Typesetting Standard”. Scan operation Region Server Client Create scanner Condition c1=5 R1 User Table R2 Index Table aa ad aa ad Coprocessor Create scanner on index Start row aaidx15 Stop row aaidx16 Creating Scanner for index table at
27、 sever side Page 10 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by custom
28、ers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Ty
29、pesetting Standard”. Scan operation Region Server Client R1 User Table R2 Index Table aa ad aa ad Coprocessor next() next() Seek to exact row Scan index data and seek to exact rows in the user table Index usage at server side Page 11 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0
30、B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotype
31、s. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. CP reads index data and seek to exact rows in user table Doing se
32、eks on HFiles based on rowkey obtained from index data HFiles reads as block by block Default block size is 64KB Skipping block reads from HDFS where data not at all present Some times skip a full HFile No need to read index details back to client avoiding network extra usage Scan operation Page 12
33、HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : A
34、rial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.
35、 Explicit split on index region is avoided When user table region splits, corresponding index region also splits Split key for index region same as that of user region Custom HalfStoreFileReader for index daughter regions Region Split IndexHalfStoreFileReader Both half region readers starts at same
36、point ie. begin of Hfile Checks the actual table rowkey part and decide KV corresponds to it or not IndexHalfStoreFileReader for daughter B changes the key as per the daughter region startkey. Page 13 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext
37、LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of
38、 colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Performance Test Results (Scan) 4 Region Servers. Table regions # 160 Total records : 570 million
39、Per record size : 800 bytes EQUALS condition on a column 01000200030004000500060007000100 8000 1million 10 million5712 5784 5827 6045 45 288 547 1867 Without IndexWith IndexSecondsResult rows # Page 14 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext
40、 LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups o
41、f colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. 4 Region servers, table with 160 regions 10% degradation in put performance Performance Test Resu
42、lts (Put) 0200004000060000800001000001200001 1 2 3 4 5 7 8Without IndexWith IndexElapsed time (sec) Page 15 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level
43、 2-5: 18pt Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should
44、 only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Design Supports multiple index on table and multi column index Support indexing part of a column value Support for equals and range condition Scans using index. Support to dynamically add/dro
45、p index Support bulk loading data to indexed table Indexing done with bulk load Application Usage No change in scan code for the client app. No need to specify the index(s) to be used. Intelligence to find best index(s) to be used for a Scan by looking at the Filters. Upgrade / Integration Very less
46、 code changes in HBase core. HBase version upgradation is very easy for us Salient aspects Page 16 HUAWEI TECHNOLOGIES CO., LTD. Slide title :32-35pt Color: R153 G0 B0 Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Slide text :20-22pt Bullets level 2-5: 18p
47、t Color:Black Corporate Font : FrutigerNext LT Medium Font to be used by customers and partners : Arial Top right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”. Q&A? Page 17 Thank you