当数据驻留在 HDFS(HFile) 上时,HBase 的读取性能如何

What's the HBase read performance when data resides on HDFS(HFile)

我们知道,当内存中的数据达到阈值时,内存中的数据将以HFile的形式刷新到HDFS

当我想通过row key获取一条数据,但是数据在HDFS上,HBase如何保证检索速度(或者随机访问速度)?看起来它会比从内存存储中检索慢得多?

来自 HBase Reference Guide:

HBase provides two different BlockCache implementations to cache data read from HDFS: the default on-heap LruBlockCache and the BucketCache, which is (usually) off-heap...

LruBlockCache is the original implementation, and is entirely within the Java heap. BucketCache is optional and mainly intended for keeping block cache data off-heap...

HBase 还收集块缓存统计信息,并通过其 Web UI 呈现它们。通过适当的调整,您可以获得 90%-95% 的命中率,因此您大部分时间仍在从内存中读取。