Presentation is loading. Please wait.

Presentation is loading. Please wait.

HBase. OUTLINE Basic Data Model Implementation – Architecture of HDFS Hbase Server HRegionServer 2.

Similar presentations


Presentation on theme: "HBase. OUTLINE Basic Data Model Implementation – Architecture of HDFS Hbase Server HRegionServer 2."— Presentation transcript:

1 HBase

2 OUTLINE Basic Data Model Implementation – Architecture of HDFS Hbase Server HRegionServer 2

3 Basic HBase directly uses or subclasses the parent Hadoop implementation

4 Basic 4 Linux

5 Basic DataBase of problem: – Growth of Data – Complexity of install and maintain Multi-RDBMS of problem:(for nodes ) – JOIN – not effective – rebalance Solution : Relational DataBase Management System(RDBMS) Solution : NoSQL DataBase

6 Basic NoSQL DataBase : – Distributed – Scalability – Easy to use (EX:put, get,alter etc.)

7 Basic List of NoSQL: – OpenSource HBase (Yahoo!) Cassandra (Facebook) SimpleDB (Amazon) – Commercial BigTable (Google)

8 Basic Hbase: – Hadoop’s DataBase. – Reversion of 0.20.6 released – Usage with Map/Reduce

9 OUTLINE Basic Data Model Implementation – Architecture of HDFS Hbase Server HRegionServer 9

10 Row-Oriented Data Model EmpIdLastnameFirstnameSalary 10SmithJoe40000 12JonesMary50000 11JohnsonCathy44000 22JonesBob55000 001:10,Smith,Joe,40000; 002:12,Jones,Mary,50000; 003:11,Johnson,Cathy,44000; 004:22,Jones,Bob,55000;

11 Row-Oriented Data Model EmpIdLastnameFirstnameSalary 10SmithJoe40000 12JonesMary50000 11JohnsonCathy44000 22JonesBob55000 To improve the performance of these sorts of operations, most DBMS's support the use of database indexes, which store all the values from a set of columns along with pointers back into the original rowid.database indexes 001:40000;002:50000;003:44000;004:55000;

12 Column-Oriented Model EmpIdLastnameFirstnameSalary 10SmithJoe40000 12JonesMary50000 11JohnsonCathy44000 22JonesBob55000 10:001,12:002,11:003,22:004; Smith:001,Jones:002,Johnson:003,Jones:004; Joe:001,Mary:002,Cathy:003,Bob:004; 40000:001,50000:002,44000:003,55000:004; In this layout, any one of the columns more closely matches the structure of an index in a row-based system.

13 Table member : Row, Column, TimeStamp Row key Time Stamp Column”Contents” “com.yahoo.news.tw” t3 “ 我研發水下 6 千公尺機器人 ” t2 “ 蚊子怎麼搜尋人肉 ” t1 “… Wang 40…” “com.cnn.www”t1 “ 用腦波「發聲」 ”

14 Table Add column ” Anchor ” Row key Time Stamp ”Contents” “com.yahoo. news.tw” t3 “ 我研發水下 6 千公尺 機器人 ” t2 “ 蚊子怎麼搜尋人肉 ” t1 “… Wang 40…” “com.cnn.w ww” t1 “ 用腦波「發聲」 ” Add

15 Table Row key Time Stamep ”Contents”‘’ Anchor ’’ “com.yahoo.ne ws.tw” t5 “Anchor:tech” “Silvia” t4 “Anchor:sports” “Eric” t3 “ 我研發水下 6 千公尺機器 人 ” t2 “ 蚊子怎麼搜尋人肉 ” t1“… Wang 40…” “com.cnn.ww w”t1 “ 用腦波「發聲」 ” ‘’ Anchor_tech ’’‘’ Anchor_sports ’’ Silva Eric

16 Region Row key Time Stamp ”Contents”‘’ Anchor ’’ “com.ya hoo.new s.tw” t5 “Anchor:tech” “Silvia” t4“Anchor:sports”“Eric” t3 “ 我研發水下 6 千公 尺機器人 ” t2 “ 蚊子怎麼搜尋人肉 ” t1“… Wang 40…” “com.cn n.www”t1 “ 用腦波「發聲」 ” “com.ab c.www” “com.de f.www” region1region1 region2region2 Region1(com.yahoo.ne w.tw,com.def.www>,ID Express: Region(start row key, end row key>& identifier

17 OUTLINE Basic Data Model Implementation – Architecture of Hbase Hbase Server HRegionServer 17

18 Architecture of Hbase NN: NameNode DN: DataNode HM: Hmaster HR:HRegion Cluster HDFS Client NNDN HMHR ZooKeeper

19 rebalance a single host grows the regions – it split a row into two new regions of approximately equal size. Until not across threshold automatic

20 Hbase Master Managing the insert, delete, modify, query operations to Tables. Managing the load balance among regionservers. Assigning a new regionserver for storing the region data after a region split. Migarating the region data of a failed regionserver to another regionserver

21 RegionServer carry zero or more regions client read/write/scan requests – Random access Automatic split regions Send HeartBeat to Master

22 HBase Operation -ROOT-.META. useregion Hbase has two speical tables: Root and.Meta Zookeeper record the location of root table

23 HBase Operation NN: NameNode DN: DataNode HM: Hmaster HR:Regionsever Cluster HBase Client NNDN HMRR RRR ZooKeeper ROOTMETA Request consult Step 3. User region Step 1. Step 2 Read Requests - Step 1.location of -ROOT- - Step 2.location of the.META. Region - Step3.user region space

24 HBase Operation NN: NameNode DN: DataNode HM: Hmaster HR:Regionsever Cluster HBase Client NNDN HMRR RRR ZooKeeper Interacts with RegionServer Read Requests -clients cache save information of ROOT, META and User Region

25 HBase in operation Interacts with RegionServer HBase Client HLog table Region server of state Region Serser Region Serser Hstore Region Hstore HFile Hfile Mem Store

26 HBase in operation RegionServer HBase Client HLog Client request to save data in table Region Serser Region Serser Hstore Region Hstore HFile Hfile Mem Store

27

28 Hbase of characteristic Fault tolerance Batch processing Automatic partitioning Scale linearly with new nodes


Download ppt "HBase. OUTLINE Basic Data Model Implementation – Architecture of HDFS Hbase Server HRegionServer 2."

Similar presentations


Ads by Google