Trafodion Troubleshooting-NotServingRegionException region is not online

来源:互联网 发布:记忆枕 知乎 编辑:程序博客网 时间:2024/06/10 04:21

现象

Trafodion有时候在做SQL查询时会报NotServingRegionException region is not online错误,如下

SQLException:  *** ERROR[8448] Unable to access Hbase interface. Call to ExpHbaseInterface::insertRows returned error HBASE_ACCESS_ERROR(-706). Cause: org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException: Failed 1000 actions: NotServingRegionException: 1000 times,org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.makeException(AsyncProcess.java:247)org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.access$1800(AsyncProcess.java:227)org.apache.hadoop.hbase.client.AsyncProcess.waitForAllPreviousOpsAndReset(AsyncProcess.java:1766)

分析

导致这个问题的原因有很多。比如,当Trafodion在做大量数据加载的时候或其他一些情况时,HBase后端可能同时需要做splitting操作或reblance操作,这将导致HBase表在短暂时间范围内不可用,又比如当正在运行一个进程或执行HBase操作时进程被杀掉,这可能跟zookeeper有关,又或者是HBase的storefile被损坏。

解决

根据上述发生的一些原因,解决方案有多种,具体哪种方法奏效要视具体情况而定,
1 通过增加hbase.hregion.max.filesize到100G,来减少或禁用splitting,默认为10G
2 在hbase shell中执行balance_switch false来禁用负载均衡,此时需要在非业务期定时执行balance_switch true打开HBase自动均衡功能,一段时间后再关闭balance_switch
3 停止HBase,zkcli.sh->rmr /hbase,再启动HBase
4 hadoop fsck /hbase,检查是否有corrupt的storefile,如果有使用hadoop fs -rm删除
5 hbase shell中使用is_enabled table_name,查看表是否为disable状态

阅读全文
1 0
原创粉丝点击