本帖最后由 pig2 于 2014-5-16 04:39 编辑
问题导读:
1.遇到Region is not online可能的原因是什么?
2.使用hbase你经常遇到的问题是什么?
遇到了下面错误:
14/05/16 03:59:30 INFO master.MasterFileSystem: Log folder hdfs://master:8020/hbase/WALs/slave1,60020,1400183951986 belongs to an existing region server 14/05/16 03:59:30 INFO master.MasterFileSystem: Log folder hdfs://master:8020/hbase/WALs/slave2,60020,1400183952632 belongs to an existing region server 14/05/16 03:59:34 INFO catalog.CatalogTracker: Failed verification of hbase:meta,,1 at address=slave1,60020,1400174771092, exception=org.apache.hadoop.hbase.NotServingRegionException: org.apache.hadoop.hbase.NotServingRegionException: Region is not online: 1588230740 at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2576) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3949) at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionInfo(HRegionServer.java:3366) at org.apache.hadoop.hbase.protobuf.generated.AdminProtos$AdminService$2.callBlockingMethod(AdminProtos.java:19789) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2146) at org.apache.hadoop.hbase.ipc.RpcServer$Handler.run(RpcServer.java:1851) 14/05/16 03:59:34 INFO zookeeper.ZooKeeperNodeTracker: Unsetting hbase:meta region location in ZooKeeper 14/05/16 03:59:34 INFO master.AssignmentManager: Assigning hbase:meta,,1.1588230740 to slave1,60020,1400183951986 14/05/16 03:59:34 INFO master.RegionStates: Transitioned {1588230740 state=OFFLINE, ts=1400183974039, server=null} to {1588230740 state=PENDING_OPEN, ts=1400183974164, server=slave1,60020,1400183951986}
遇到这个错误原因有很多,这里总结整理一下:
可能原因1:
zookeeper引起的,通常这种情况往往是在你正在运行一个进程正在操作hbase数据库的时候,hbase进程被杀掉或hbase服务被停掉所引起的,如果是hbase自身管理的zookeeper
解决方法1:
可以将hbase的zookeeper目录下的文件全都删除掉,然后再重启hbase服务就可以了.
解决方法2:
检查一下是否只有master创建了zookeeper目录
注释:
配置zookeeper的的目录为属性hbase.zookeeper.property.dataDir
可能原因2:
数据损坏导致当前数据存放的regin无法使用,使用hadoop fsck检查是否有损坏块
解决方案:
此时使用hadoop fsck 进行分析 就能看到CORRUPT 的storefile路径 hadoop fs -rm 当前storefile
|
|