Hbase WALs(HLog) 文件存储,查看
WALs(HLog)? 存儲
HLog 存儲位置是在,hbase配置目錄下WALs目錄,默認為 /hbase/WALs? 與? /hbase/oldWALs
/hbase/WALs : 存儲未過期的日志/hbase/oldWALs : 存儲已過期的日志這里先查看WALs日志目錄,目錄格式為:hostname1 為 服務器hostname , 16020 為hbase 端口,1561747594397 為目錄創建時間
drwxr-xr-x - hbase hbase 0 2019-08-13 15:58 /hbase/WALs/hostname1,16020,1561747594397?目錄下存放著Hlog?
-rw-r--r-- 2 hbase hbase 268440291 2019-08-13 15:58 /hbase/WALs/hostname1,16020,1561747594397/hostname1%2C16020%2C1561747594397.hostname1%2C16020%2C1561747594397.regiongroup-0.1565681614115查看日志內容
?hbase hlog -j?/hbase/WALs/hostname1,16020,1561747594397/hostname1%2C16020%2C1561747594397.hostname1%2C16020%2C1561747594397.regiongroup-0.1565681614115Hbase 2.0 之后使用
?hbase wal -j?/hbase/WALs/hostname1,16020,1561747594397/hostname1%2C16020%2C1561747594397.hostname1%2C16020%2C1561747594397.regiongroup-0.1565681614115更多介紹參考:https://hbase.apache.org/book.html#wal
Deprecated in 1.0 admin commands have been removed.
The following commands that were deprecated in 1.0 have been removed. Where applicable the replacement command is listed.
-
The 'hlog' command has been removed. Downstream users should rely on the 'wal' command instead.
看下命令介紹:-j 以json輸出,-p輸出value值,默認是補輸出value?
[root@hostname ~]# hbase wal Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release usage: WAL <filename...> [-h] [-j] [-p] [-r <arg>] [-s <arg>] [-w <arg>]-h,--help Output help message-j,--json Output JSON-p,--printvals Print values-r,--region <arg> Region to filter by. Pass encoded region name; e.g.'9192caead6a5a20acb4454ffbc79fa14'-s,--sequence <arg> Sequence to filter by. Pass sequence number.-w,--row <arg> Row to filter by. Pass row name.Hlog查看?
hbase wal /hbase/WALs/hostname1,16020,1561747594397/hostname1%2C16020%2C1561747594397.hostname1%2C16020%2C1561747594397.regiongroup-0.1565681614115 | less row=d687aa8919594289543efde17047217b, column=fn:friends_count row=d687aa8919594289543efde17047217b, column=fn:created_at row=d687aa8919594289543efde17047217b, column=fn:description row=d687aa8919594289543efde17047217b, column=fn:experience row=d687aa8919594289543efde17047217b, column=fn:uid row=d687aa8919594289543efde17047217b, column=fn:province row=d687aa8919594289543efde17047217b, column=fn:zan_count row=d687aa8919594289543efde17047217b, column=fn:verified_reason row=d687aa8919594289543efde17047217b, column=fn:level_info row=d687aa8919594289543efde17047217b, column=fn:reposts_count row=d687aa8919594289543efde17047217b, column=fn:isRepeat row=d687aa8919594289543efde17047217b, column=fn:profileImageUrl row=d687aa8919594289543efde17047217b, column=fn:read_count row=d687aa8919594289543efde17047217b, column=fn:growthSpeed row=d687aa8919594289543efde17047217b, column=fn:verified row=d687aa8919594289543efde17047217b, column=fn:verified_type row=d687aa8919594289543efde17047217b, column=fn:growthValue row=d687aa8919594289543efde17047217b, column=fn:url?Hlog過期
當數據從memstore寫入到磁盤中,Hlog就已經沒有用了,會把/hbase/WALs目錄下的數據移動到/hbase/oldWALs 目錄下,oldWALs目錄下的數據會根據 hbase.master.cleaner.interval (默認1分鐘)配置的時間定期去檢查,如發現有數據會清除,清除前還會檢驗一個參數?hbase.master.logcleaner.ttl ,也就是說數據保存1分鐘以上才會刪除,如果一分鐘內數據直接從memstore寫入到了磁盤,oldWALs下的數據也不會被刪除
?
總結
以上是生活随笔為你收集整理的Hbase WALs(HLog) 文件存储,查看的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ElasticSearch 索引、更新和
- 下一篇: opengl光照