HBase is a distributed, scalable, big data store that is modeled after Google's BigTable. It uses HDFS for storage and is written in Java. HBase provides a key-value data model and allows for fast lookups by row keys. It does not support SQL queries or transactions. Clients can access HBase data via Java APIs, REST, Thrift or MapReduce. The architecture consists of a master server and multiple region servers that host regions and serve client requests.
1 of 16
Downloaded 79 times
More Related Content
Zh Tw Introduction To H Base
1. Hbase
(Data Model) (Architecture)
Public 2009/5/13
4. HBase
? 2006 11
C Google BigTable
? 2007 2
C HBase Hadoop
? 2007 10
C HBase
? 2008 1
C Hadoop Apache HBase
? 2008 10
C HBase 0.18 0.19
Copyright 2009 - Trend Micro Inc.
5. HBase ´
? 音頁P塀(Relational)Y創賚欺y
C 燕鯉(Table)峪嗤匯麼勣沫哈?(primary?index)?軸?row?key.
C 音戻工?join
C 音戻工?SQLZ隈。
? 戻工Java痕塀,?c?RESTcThrift吉初中。
? 戻工?getRow(),?Scan()?贋函Y創。
C getRow()辛參函誼匯Prow?range議Y創揖r匆辛參峺協井云
(timestamp)。
C Scan()辛參函誼屁燕鯉議Y創賜頁匯Mrow?range?(O協start?key,?end?
key)
C 嗤浹淋來(Aatomicity)c住叟?(transaction)孔嬬.
C 峪嗤匯NY創侏B?(bytes)
Copyright 2009 - Trend Micro Inc.
6. Bigtable?
? (Relational Database) C.R.U.D
(create, retrieval, update, delete)
?
C Big queries C
C Big databases - 100 Terabytes
? Bigtable MapReduce
Classification Copyright 2009 - Trend Micro Inc.
8. (Logical Data Model)
? Table row key
? Table schema column families .
C column family columns
C column (timestamp)
C Column row columns
C column family columns
column
C 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. (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. C
?
C Blog entry title, date, author, type, text
C User username, password
C Blog entry Comments comment title, author, text
? ERD
Classification Copyright 2009 - Trend Micro Inc.
11. C HBase Table Schema
? Row key
C type ( 2 ) timestamp
C 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. HBase
Region Row Keys Column Family ? region
^Content: ̄
Region 1 00000 ´ C Region startKey
00001 ´ endKey
´ ´ ? region
09999 ´
Region 2 10000 ´ HDFS
´ ´ region Hadoop
´ ´
29999 ´
Classification Copyright 2009 - Trend Micro Inc.
13. HBase
? Region Servers
C request (write/read/scan)
C heartbeat master
C region servers throughput
? HBase Master
C region servers
C regions region servers
C region server
C master single point of failure
Classification Copyright 2009 - Trend Micro Inc.
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. HBase Client Interface
? Java client
C get(byte [] row, byte [] column, long timestamp, int versions);
? Non-Java clients
C Thrift server
? Sample ruby, c++, & java (via thrift) clients
C REST server
? TableInput/OutputFormat for MapReduce
? HBase Shell
C ./bin/hbase shell YOUR_SCRIPT
Classification Copyright 2009 - Trend Micro Inc.
16. ? Google BigTable
C http://labs.google.com/papers/bigtable.html
? HBase
C http://hadoop.apache.org/hbase/
? HBase wiki
C http://wiki.apache.org/hadoop/Hbase
Classification Copyright 2009 - Trend Micro Inc.