最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

hbase中查看hlog文件内容

来源:动视网 责编:小采 时间:2020-11-09 13:13:52
文档

hbase中查看hlog文件内容

hbase中查看hlog文件内容:hbase 中除了有查看hfile文件的命令,也提供也查看hlog文件的命令: 在 hbase 的根目录下有个.logs目录,里面就是hlog文件,一台RegionServer机器对应一个文件。老的hlog文件会被移到.oldlogs目录: [admin@bufer108081.tbc ~/de
推荐度:
导读hbase中查看hlog文件内容:hbase 中除了有查看hfile文件的命令,也提供也查看hlog文件的命令: 在 hbase 的根目录下有个.logs目录,里面就是hlog文件,一台RegionServer机器对应一个文件。老的hlog文件会被移到.oldlogs目录: [admin@bufer108081.tbc ~/de


hbase 中除了有查看hfile文件的命令,也提供也查看hlog文件的命令: 在 hbase 的根目录下有个.logs目录,里面就是hlog文件,一台RegionServer机器对应一个文件。老的hlog文件会被移到.oldlogs目录: [admin@bufer108081.tbc ~/dev/baoniu]$ hadoop fs -ls /hb

hbase中除了有查看hfile文件的命令,也提供也查看hlog文件的命令:

在hbase的根目录下有个.logs目录,里面就是hlog文件,一台RegionServer机器对应一个文件。老的hlog文件会被移到.oldlogs目录:

[admin@bufer108081.tbc ~/dev/baoniu]$ hadoop fs -ls /hbase-0.90/.logs
Found 49 items
drwxrwxr-x - hadoop hadoop,admin 0 2014-05-20 20:43 /hbase-0.90/.logs/bufer108056.tbc,30020,14000497983
drwxrwxr-x - hadoop hadoop,admin 0 2014-05-20 20:43 /hbase-0.90/.logs/bufer108057.tbc,30020,1400049798399
drwxrwxr-x - hadoop hadoop,admin 0 2014-05-20 20:43 /hbase-0.90/.logs/bufer108058.tbc,30020,1400049798425

命令的参数:

[admin@bufer108081.tbc ~/dev/baoniu]$ ~/hbase/bin/hbase org.apache.hadoop.hbase.regionserver.wal.HLog --dump
Usage: HLog 
Arguments:
 --dump Dump textual representation of passed one or more files
 For example: HLog --dump hdfs://example.com:9000/hbase/.logs/MACHINE/LOGFILE
 --split Split the passed directory of WAL logs
 For example: HLog --split hdfs://example.com:9000/hbase/.logs/DIR

[admin@bufer108081.tbc ~/dev/baoniu]$ ~/hbase/bin/hbase org.apache.hadoop.hbase.regionserver.wal.HLog --dump -h usage: HLog  [-h] [-j] [-p] [-r ] [-s ] [-w ]
 -h,--help Output help message
 -j,--json Output JSON
 -p,--printvals Print values
 -r,--region Region to filter by. Pass region name; e.g.
 '.META.,,1'
 -s,--sequence Sequence to filter by. Pass sequence number.
 -w,--row Row to filter by. Pass row name.

通过以下命令就可以查看hlog文件的内容:

[admin@bufer108081.tbc ~/dev/baoniu]$ ~/hbase/bin/hbase org.apache.hadoop.hbase.regionserver.wal.HLog --dump -p /hbase-0.90/.logs/bufer108118.tbc,30020,1400049798450/bufer108118.tbc%2C30020%2C1400049798450.1400557412298
14/05/20 15:06:49 INFO Configuration.deprecation: fs.default.name is deprecated. Instead, use fs.defaultFS
Sequence 8347119 from region a994dbcf5b1fcd47f69efcf804c385 in table test
 Action:
 row: 0042:2100520170149
 column: a:title
 at time: Tue May 20 11:43:45 CST 2014
 value: xE5x95x86xE5x93x81xE4xB8xADxE8xAFx95xE5xAEx9DxE8xB4x9D
 Action:
 row: 0042:2100520170149
 column: a:user_id
 at time: Tue May 20 11:43:45 CST 2014
 value: 7786
 Action:
 row: 0042:2100520170149
 column: a:pict_url
 at time: Tue May 20 11:43:45 CST 2014
 value: 19/60/74/196074.jpg
 Action:
 row: 0042:2100520170149
 column: a:categ
 at time: Tue May 20 11:43:45 CST 2014
 value: 1101
 Action:
 row: 0042:2100520170149
 column: a:minimum_bid
 at time: Tue May 20 11:43:45 CST 2014
 value: 2000.00
 Action:
 row: 0042:2100520170149
 column: a:reserve_price
 at time: Tue May 20 11:43:45 CST 2014
 value: 2000.00

文档

hbase中查看hlog文件内容

hbase中查看hlog文件内容:hbase 中除了有查看hfile文件的命令,也提供也查看hlog文件的命令: 在 hbase 的根目录下有个.logs目录,里面就是hlog文件,一台RegionServer机器对应一个文件。老的hlog文件会被移到.oldlogs目录: [admin@bufer108081.tbc ~/de
推荐度:
标签: 文件 查看 内容
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top