HBase 查看HFile内容
hbase 查看HFile hbase的数据文件最终存放的是HFile文件,即对MFile存储格式的封装修改,存储的为二进制格式内容,目前hbase提供的hbase org.apache.hadoop.hbase.io.hfile.HFile 工具类可以查看HFile文件内容,对排查region的分布情况有很大用途,以下为查询步骤:
- 定位HFile文件
[hadoop@rm ~]$ hadoop fs -ls /hbase/data/default/TEST/b91a1994accb6e4fc2515aadd74dfc7b/0
15/03/26 17:47:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Found 1 items
-rw-r--r-- 3 hadoop supergroup 327313 2015-03-20 22:18 /hbase/data/default/TEST/b91a1994accb6e4fc2515aadd74dfc7b/0/8413bc9aa70342f0a86a7ca7d70568a9
- HFile查看8413bc9aa70342f0a86a7ca7d70568a9 文件
hbase hbase org.apache.hadoop.hbase.io.hfile.HFile -f /hbase/data/default/TEST/b91a1994accb6e4fc2515aadd74dfc7b/0/8413bc9aa70342f0a86a7ca7d70568a9 -p
- 回车即可
- 更多hbase org.apache.hadoop.hbase.io.hfile.HFile 的参数 可以
[hadoop@rm ~]$ /oneapm/local/hbase-0.98.10.1-hadoop2/bin/hbase org.apache.hadoop.hbase.io.hfile.HFile
2015-03-26 17:52:45,338 INFO [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
2015-03-26 17:52:45,485 INFO [main] util.ChecksumType: Checksum using org.apache.hadoop.util.PureJavaCrc32
2015-03-26 17:52:45,486 INFO [main] util.ChecksumType: Checksum can use org.apache.hadoop.util.PureJavaCrc32C
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/oneapm/local/hbase-0.98.10.1-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/oneapm/local/hadoop-2.5.2/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2015-03-26 17:52:45,757 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2015-03-26 17:52:46,329 INFO [main] Configuration.deprecation: fs.default.name is deprecated. Instead, use fs.defaultFS
usage: HFile [-a] [-b] [-e] [-f <arg> | -r <arg>] [-h] [-k] [-m] [-p]
[-s] [-v] [-w <arg>]
-a,--checkfamily Enable family check
-b,--printblocks Print block index meta data
-e,--printkey Print keys
-f,--file <arg> File to scan. Pass full-path; e.g.
hdfs://a:9000/hbase/hbase:meta/12/34
-h,--printblockheaders Print block headers for each block.
-k,--checkrow Enable row order check; looks for out-of-order
keys
-m,--printmeta Print meta data of file
-p,--printkv Print key/value pairs
-r,--region <arg> Region to scan. Pass region name; e.g.
'hbase:meta,,1'
-s,--stats Print statistics
-v,--verbose Verbose output; emits file and meta data
delimiters
-w,--seekToRow <arg> Seek to this row and print all the kvs for this
row only
[hadoop@rm ~]$
相关推荐
hbase hfile v2 format draft 描述存储结构
MapReduce生成HFile入库到HBase 可能需要的jar包,一共有3个 可以直接放在每台机器的${HADOOP_HOME}/lib下 hadoopHadoop 1.1.2 + hbase 0.94.6.1
Hive HBase生成HFile 该项目包含一个示例,该示例利用Hive HBaseStorageHandler生成HFile。 这种模式提供了一种方法,用于获取已存储在Hive中的数据,将其导出为HFile,并从这些HFile批量加载HBase表。概述HFile生成...
hbase1.x 跟2.x比较.docx
3.1. 从HBase 0.20.x or 0.89.x 升级到 HBase 0.90.x 3.2. 从 0.90.x 到 0.92.x 4. The HBase Shell 4.1. 使用脚本 4.2. Shell 技巧 5. 数据模型 5.1. 概念视图 5.2. 物理视图 5.3. 表 5.4. 行 5.5. 列族 5.6. Cells...
一、将Hadoop中普通文本格式的数据转化为可被HBase识别的HFile文件,HFile相当于Oracle中的DBF数据 文件。 二、将HFile载入到HBase中,该过程实际就是将数据从一个地移动到HBase某表数据的存放地。
/hbase/archive (1) 进行snapshot或者升级的时候使用到的归档目录。compaction删除hfile的时 候,也会把旧的hfile归档到这里等。 /hbase/corrupt (2) splitlog的corrupt目录,以及corrupt hfile的目录。
hbase从HBase表中导入数据到Hbase表中将fruit表中的一部分数据,通过MR迁入到fruit_mr表中从HDFS中导入数据到Hbase表中根据HDFS中的数据导入到fruit_hdfs表中
NULL 博文链接:https://liuyq1991.iteye.com/blog/2109364
2.2 hbase的应用 7 2.3 HBase的体系结构简介 8 2.4 HBase的访问方式 9 2.5 适用场景 9 3 HBase使用流程 10 3.1 流程图 10 4 使用约定 12 4.1 权限管理 12 4.2 命名规范 12 5 模型设计 13 5.1 相关概念 13 5.2 模型...
StoreFile是对HFile的封装。StoreFile真正存储在HDFS上。 所以写数据时先往HLog上写一份,再往MemStore上写一份。当MemStore达到一定大小则往StoreFile上写。若MemStore数据有丢失,则从HLog上恢复。 而读数据时先到...
hfile 到 hbase 处女发表
1、在HBase shell中创建数据表 create '表名', {NAME=>'Polygon/Polyline/Point'} 2、将要处理的tsv格式数据存储到HDFS上 ...hbase org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles HFile路径 空间数据表名
关于hbase的入门知识.hbase是基于hdfs建立的数据库,可扩展性强。
Spark SQL HBase 库 用于将 Spark 与 Apache HBase 数据结合使用的集成实用程序。 支持 基于 HBase 读取的扫描 ... 基于 HBase 读取的分析 HFile 基于 HBase 写入的批量加载 要求 这个库需要 Spark 1.2+
使用 API 将数据放入工作中,但因为它必须遍历 HBase 的写入路径(即在将其刷新到 HFile 之前通过 WAL 和 memstore),它比您简单地绕过该批次并自己创建 HFiles 和将它们直接复制到 HDFS 中。 幸运的是 HBase 带有...
使用 API 将数据放入工作中,但因为它必须遍历 HBase 的写入路径(即在将其刷新到 HFile 之前通过 WAL 和 memstore),它比您简单地绕过该批次并自己创建 HFiles 和将它们直接复制到 HDFS 中。 幸运的是 HBase 带有...
是实际数据存储文件HFile的轻量级封装,每个Store会对应一个MemStore。写入数据时数据会先写入Hlog中成功后在写入MemStore中。Memstore中的数据因为空间有限,所以需要定期flush到文件StoreFile中,每次flush都是...
该工具是HBase提供的一个将HDFS数据转化为HBase数据库数据的一个工具。 其实现过程是,先将HDFS文件转复制并转化为HFile文件,然后将HFile移动并加载成为HBase的数据文件。