分类: 云计算
2012-04-26 09:14:18
今天运行hbase的时候发现这个错误:
ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times
查看log,发现大量的
2012-04-26 08:13:39,600 INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode...
原来hdfs还处于安全模式
./hadoop fsck /
/hbase/.logs/slave1,60020,1333159627316/slave1%2C60020%2C1333159627316.1333159637444: Under replicated blk_-4160280099734447327_1626. Target Replicas is 3 but found 2 replica(s).
....
/home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201203211238_0002/job.jar: Under replicated blk_-7807519084475423360_1012. Target Replicas is 10 but found 2 replica(s).
......................................................................Status: HEALTHY
Corrupt blocks: 0
Missing replicas: 9 (3.0612245 %)
Number of data-nodes: 2
没有损坏的block,有9个丢失的replicas,状态健康
所以可以强制离开安全模式
hadoop dfsadmin -safemode get
Warning: $HADOOP_HOME is deprecated.
Safe mode is ON
hadoop dfsadmin -safemode leave
Warning: $HADOOP_HOME is deprecated.
Safe mode is OFF
运行hbase命令成功