Zh Tw Introduction To H Base

2,970 views

Published on

http://www.trend.org

Published in: Technology, News & Politics
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,970
On SlideShare
0
From Embeds
0
Number of Embeds
104
Actions
Shares
0
Downloads
79
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Zh Tw Introduction To H Base

  1. 1. Hbase (Data Model) (Architecture)  Public 2009/5/13
  2. 2. • HBase • HBase • HBase • Copyright 2009 - Trend Micro Inc.
  3. 3. Introduction to HBase ‧ HBase (Multi-Dimensional Map) ‧ Hbase Petabytes ‧ HBase Hadoop (HDFS) Bigtable ‧ Hbase Hadoop MapReduce Copyright 2009 - Trend Micro Inc.
  4. 4. HBase • 2006 11 – Google BigTable • 2007 2 – HBase Hadoop • 2007 10 – HBase • 2008 1 – Hadoop Apache HBase • 2008 10 – HBase 0.18 0.19 Copyright 2009 - Trend Micro Inc.
  5. 5. HBase … • 不是關聯式(Relational)資料庫系統 – 表格(Table)只有一個主要索引
(primary
index)
即
row
key. – 不提供
join – 不提供
SQL語法。 • 提供Java函式庫,
與
REST與Thrift等介面。 • 提供
getRow(),
Scan()
存取資料。 – getRow()可以取得一筆row
range的資料,同時也可以指定版本 (timestamp)。 – Scan()可以取得整個表格的資料或是一組row
range
(設定start
key,
end
 key) – 有限的單元性(Aatomicity)與交易
(transaction)功能. – 只有一種資料型態
(bytes) Copyright 2009 - Trend Micro Inc.
  6. 6. Bigtable? • (Relational Database) C.R.U.D (create, retrieval, update, delete) • – Big queries – – Big databases - 100 Terabytes • Bigtable MapReduce Classification Copyright 2009 - Trend Micro Inc.
  7. 7. HBase? • HBase Bigtable • • Hadoop (HDFS) • HBase Apache Classification Copyright 2009 - Trend Micro Inc.
  8. 8. (Logical Data Model) • Table row key • Table schema column families . – column family columns – column (timestamp) – Column row columns – column family columns column – byte[] (Row, Family: Column, Timestamp)  Value Row Key Time Column Column (Family) Stamp (Family) “anchor:” “content:” com.cnn.www t9 “<html>…” “anchor:cnnsi.com” “CNN” t8 “anchor:cnnsi.com” “CNN” “anchor:my.lock.ca” “MyLook” t6 “<html>…” Classification Copyright 2009 - Trend Micro Inc.
  9. 9. (Physical Data Model) • HBase Table column family Row Key Time Column (Family) Stamp “content:” com.cnn.www t9 “<html>…” t6 “<html>…” Row Key Time Column (Family) Stamp “anchor:” com.cnn.www t9 “anchor:cnnsi. “CNN” com” t8 “anchor:cnnsi. “CNN” com” “MyLook” “anchor:my.loc k.ca” Classification Copyright 2009 - Trend Micro Inc.
  10. 10. – • – Blog entry title, date, author, type, text – User username, password – Blog entry Comments comment title, author, text • ERD Classification Copyright 2009 - Trend Micro Inc.
  11. 11. – HBase Table Schema • Row key – type ( 2 ) timestamp – rows type timestamp scan () Table • BLOGENTRY COMMENT ” ” comment_title, comment_author, comment_text column families column Column comment timestamp column family column Classification Copyright 2009 - Trend Micro Inc.
  12. 12. HBase Region Row Keys Column Family • region “Content:” Region 1 00000 … – Region startKey 00001 … endKey … … • region 09999 … Region 2 10000 … HDFS … … region Hadoop … … 29999 … Classification Copyright 2009 - Trend Micro Inc.
  13. 13. HBase • Region Servers – request (write/read/scan) – heartbeat master – region servers throughput • HBase Master – region servers – regions region servers – region server – master single point of failure Classification Copyright 2009 - Trend Micro Inc.
  14. 14. HBase ROOT Region Server META Region 1 Region Server Region 2 Master Region 3 Region Server HRPC HRPC Region 4 Clients Region Region 5 Server Region 6 Classification Copyright 2009 - Trend Micro Inc.
  15. 15. HBase Client Interface • Java client – get(byte [] row, byte [] column, long timestamp, int versions); • Non-Java clients – Thrift server • Sample ruby, c++, & java (via thrift) clients – REST server • TableInput/OutputFormat for MapReduce • HBase Shell – ./bin/hbase shell YOUR_SCRIPT Classification Copyright 2009 - Trend Micro Inc.
  16. 16. • Google BigTable – http://labs.google.com/papers/bigtable.html • HBase – http://hadoop.apache.org/hbase/ • HBase wiki – http://wiki.apache.org/hadoop/Hbase Classification Copyright 2009 - Trend Micro Inc.

×