Hbase内部结构
-
1.Hbase的数据写入过程

When a write is made, by default, it goes into two
places: the write-ahead log ( WAL ), also referred to as the HL og, and the MemStore (figure 2.1). The default behavior of HB ase recording the write in both places is in order to maintain data durability. Only after the change is written to and confirmed in
both places is the write considered complete.
The MemStore is a write buffer where HB ase accumulates data in memory before a permanent write. Its contents are flushed to disk to form an HF ile when the MemStore fills up. It doesn’t write to an existing HF ile but instead forms a new file on every flush.The HFile is the underlying storage format for HB ase. HF iles belong to a column family,and a column family can have multiple HF iles. But a single HF ile can’t have data for mul-tiple column families. There is one MemStore per column family.
The WAL is a file on the underlying file system. A write isn’t considered successful until the new WAL entry is successfully written. This guarantee makes HB ase as durable as the file system backing it. Most of the time, HB ase is backed by the Hadoop Distributed Filesystem ( HDFS ).2.Hbase数据读取过程
HB ase has an LRU cache for reads.This cache, also called the BlockCache, sits in the JVM heap alongside the MemStore.

3.HFiles的归并
A minor compaction folds HFiles together,creating a larger HF ile from multiple smaller HFiles

When a compaction operates over all HF iles in a column family in a given region, it’s called a major compaction.
4.Hbase的表结构


逻辑视图

物理视图:面向列的存储

-
Hbase和HDFS的关系

-
如何进行分布式访问:

-
