您好,登录后才能下订单哦!
这篇文章主要讲解了“Hbase的某Region长期处于RIT状态怎么解决”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Hbase的某Region长期处于RIT状态怎么解决”吧!
Hbase web UI 发现某Region长期处于如下状态:
app_user_isnew,02,1517807389209.3eb41df715cdd0f9a2b0ce6550b586b3. state=PENDING_OPEN, ts=Wed Mar 14 21:22:10 CST 2018 (396447s ago), server=yq-hadoop184132,60020,1520836279511
Regions in Transition,没错,出现了RIT。
执行 hbase hbck 命令检查:
ERROR: Region { meta => app_user_isnew,02,1517807389209.3eb41df715cdd0f9a2b0ce6550b586b3., hdfs => hdfs://yq-hadoop19:8020/hbase/data/default/app_user_isnew/3eb41df715cdd0f9a2b0ce6550b586b3, deployed => , replicaId => 0 } not deployed on any region server. 18/03/19 11:40:08 INFO util.HBaseFsck: Handling overlap merges in parallel. set hbasefsck.overlap.merge.parallel to false to run serially. ERROR: There is a hole in the region chain between 02 and 03. You need to create a new .regioninfo and region dir in hdfs to plug the hole. ERROR: Found inconsistency in table app_user_isnew
检查结果显示,该表存在一个 空洞 问题,我们定位到如下分区:
| app_user_isnew,02,1517807389209.3eb41df715cdd0f9a2b0ce6550b586b3. | yq-hadoop184140:60020| 02 | 03 |
检查Hbase元数据,元数据是存在的,如下:
hbase(main):053:0> get'hbase:meta','app_user_isnew,02,1517807389209.3eb41df715cdd0f9a2b0ce6550b586b3.' COLUMN CELL info:regioninfo timestamp=1517807391090, value={ENCODED => 3eb41df715cdd0f9a2b0ce6550b586b3, NAME => 'app_user_isnew,02,1517807389209.3eb41df715cdd0f9a2b0ce6550b586b3.', STARTKEY => '02', ENDKEY => '03'} info:seqnumDuringOpen timestamp=1520449077356, value=\x00\x00\x00\x00\x00\x00\x00\x13 info:server timestamp=1520449077356, value=yq-hadoop184140:60020 info:serverstartcode timestamp=1520449077356, value=1520214106665 4 row(s) in 0.0070 seconds
检查HDFS目录文件,发现.regioninfo文件也是存在的,如下:
$ hdfs dfs -ls /hbase/data/default/app_user_isnew/3eb41df715cdd0f9a2b0ce6550b586b3 Found 3 items -rw-r--r-- 3 hbase hbase 53 2018-02-05 13:09 /hbase/data/default/app_user_isnew/3eb41df715cdd0f9a2b0ce6550b586b3/.regioninfo drwxr-xr-x - hbase hbase 0 2018-02-05 13:09 /hbase/data/default/app_user_isnew/3eb41df715cdd0f9a2b0ce6550b586b3/f1 drwxr-xr-x - hbase hbase 0 2018-03-08 02:57 /hbase/data/default/app_user_isnew/3eb41df715cdd0f9a2b0ce6550b586b3/recovered.edits
既然元数据表和HDFS目录中都有,那应该是该region注册的问题,我们执行以下命令:
hbase hbck -fixAssignments
此命令用于修复未分配,错误分配或者多次分配Region的问题。
执行结果如下:
# hbase hbck -fixAssignments 18/03/19 14:14:19 INFO Configuration.deprecation: fs.default.name is deprecated. Instead, use fs.defaultFS HBaseFsck command line options: -fixAssignments 18/03/19 14:14:19 WARN util.HBaseFsck: Got AccessDeniedException when preCheckPermission org.apache.hadoop.hbase.security.AccessDeniedException: Permission denied: action=WRITE path=hdfs://yq-hadoop19:8020/hbase/.hbase-snapshot user=hdfs at org.apache.hadoop.hbase.util.FSUtils.checkAccess(FSUtils.java:1797) at org.apache.hadoop.hbase.util.HBaseFsck.preCheckPermission(HBaseFsck.java:1929) at org.apache.hadoop.hbase.util.HBaseFsck.exec(HBaseFsck.java:4731) at org.apache.hadoop.hbase.util.HBaseFsck$HBaseFsckTool.run(HBaseFsck.java:4559) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) at org.apache.hadoop.hbase.util.HBaseFsck.main(HBaseFsck.java:4547) Current user hdfs does not have write perms to hdfs://yq-hadoop19:8020/hbase/.hbase-snapshot. Please rerun hbck as hdfs user hbase
错误显示我们应该使用hbase用户执行该命令,使用hbase用户执行。
sudo -u hbase hbase hbck -fixAssignments
执行后结果: 0 inconsistencies detected. Status: OK
感谢各位的阅读,以上就是“Hbase的某Region长期处于RIT状态怎么解决”的内容了,经过本文的学习后,相信大家对Hbase的某Region长期处于RIT状态怎么解决这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。