Skip to content

Instantly share code, notes, and snippets.

@ledangtuanbk
Last active June 3, 2020 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ledangtuanbk/34507b59780429d4d9cb095b2f4b655e to your computer and use it in GitHub Desktop.
Save ledangtuanbk/34507b59780429d4d9cb095b2f4b655e to your computer and use it in GitHub Desktop.
HBase bao gồm những gì.
- Mỗi table bao gồm nhiều row.
- Mỗi row được xác định bởi 1 rowKey duy nhất. Tương đương primary-key trong csdl thông thường.
- Mọi truy cập vào bảng đều thông qua khóa chính này.
- Mỗi row trong 1 table luôn được sắp sếp theo thứ tự từ điển theo rowkey.
- Mỗi row bao gồm nhiều columns khác nhau.
- Nhiều column gộp thành 1 column families.
- Column families được khai báo dưới dạng "families:qualifier". families là tên của columns families qualifier để xác định column
- Column qualifier gần như không giới hạn nội dung, độ dài, kiểu dữ liệu. Dữ liệu có
thể thêm không hạn chế vào column qualifier. Đây là 1 trong những yếu tố làm việc lưu
dữ liệu trong HBase rất linh hoạt và mềm dẻo.
Kiến trúc HBase bao gồm 3 components chính.
1. Hmaster. Thành phần phản lý hệ thống HMaster là thành phần trung tâm trong
kiến trúc của HBase. HMaster giám sát tất cả các Region Server thuộc cluster.
Tất cả các thay đổi liên quan đến metadata đều được thực hiện thông qua
HMaster, Những vai trò quan trọng nhất được thực hiện bởi HMaster.
Table:createTable, removeTable, enable,disable
ColumnFamily:addColumn, modifyColumn
Region: move, assign
2. HRegionServer.
Quản lý và lưu trữ các Region.
Nhận Read/Write Request from Client. -> assign for each region riêng biệt
nơi đang chứa column family. Tuy nhiên client có thể trực tiếp liên lac vs HRS
mà không cần sự cho phép của HM. HR chứa 2 thanh phần chình là Memstore và Hfile
HRegions là thành phần kiến trúc cơ sở của Hbase Cluster.
Hfile and Memstore là nơi lưu trữ dữ liệu của các table;
Zookeeper lưu trữ metadata and region info.
Dataflows in Hbase
Write operations
1. Client want write data, create connection to Region Server then connect
to Regions.
2. Region contact to memstore, store connect to column family.
3. First, data is stored at Memstore then sorted before transfer to Hfile.
Advanced Memstore
+ distributed storage bases on rowKey should be sorted.
+ Optimize data flow when using The Log-Structured Merge Tree architecture.
4. Client wants to read data from Regions.
5. Client able to direct access to Memstore and request data
6. Client get data from HFile
https://www.tutorialspoint.com/hbase/index.htm
HBase is a data model that is similar to Google's big table designed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment