Hbase principle to read and write

1 hbase read data flow
Here Insert Picture Description

1) Client ZooKeeper first visit, the reading region from the meta position of the table, and then reads the meta data table. the meta and stored in the region information of the user table;
2) namespace, table name and rowkey find region information corresponding to the meta Table;
3) find the region corresponding RegionServer;
. 4) to find the corresponding region;
. 5) start MemStore Get data, if not, then there BlockCache read;
. 6) BlockCache yet, then read on StoreFile (read for efficiency);
7) If the data is read from the inside StoreFile, instead of returning directly to the client, but the first written BlockCache, and then returned to the client.

2 Write data flow
Here Insert Picture Description
1) Client sends a write request to HregionServer;
2) HregionServer writes data HLog (write ahead log). To sustain and restore data;
3) HregionServer write data to memory (memstore);
4) written feedback Client success.

Published 133 original articles · won praise 53 · views 20000 +

Guess you like

Origin blog.csdn.net/weixin_43599377/article/details/104514795