查看HFile命令
命令: hbase hfile -v -p -m -f +要查看文件的路径
hbase hfile -v -p -m -f hdfs://ns/hbase/data/default/TEST1/5cd31c374a3b30bb859175495cbd6905/df/9df89dc0db7f401e943c5ded6d49d956
HFile放在哪里了?
查看方式一
可以通过HBase的web页面查看HFile名称及路径。步骤如下:
① 打开Web管理页面,选择表  ② 选择HRegion Server  ③ 选择Region  ④ 查看HFile路径
HFile是以列族为单位的,我建立的表有两个列族,所以这里就有两个HFile 
查看方式二
1.直接使用hdfs命令,逐层查看
命令样例:hadoop fs -ls /hbase/data/default  2. 为什么能scan到数据,却没有hfile? 通过程序向HBase插入数据之后,能够scan到数据,不过hdfs上确没有hfile。
如下图所示:scan ‘TEST1’ 能够看到表中有数据。  从Web页面上却看不到hfile  原因:
插入的数据在memstore(写缓存)中,还没有flush到hdfs上。
解决办法:
手动flush。在hbase shell环境下,有一个flush命令,可以手动刷某张表  flush之后,就可以看到hfile了  查看HFile 命令:
hbase hfile -v -p -m -f hdfs://ns/hbase/data/default/TEST1/5cd31c374a3b30bb859175495cbd6905/df/9df89dc0db7f401e943c5ded6d49d956
|