现在的位置: 首页 > 综合 > 正文

Hadoop Cannot create file Name node is in safe mode

2014年02月13日 ⁄ 综合 ⁄ 共 633字 ⁄ 字号 评论关闭

往Hadoop的HDFS写文件,出现下面问题

Stacktrace:] with root cause
org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create file/user/hadoop/building/001/44/01/17/010/building.txt. Name node is in safe mode.
The ratio of reported blocks 0.8333 has not reached the threshold 0.9990. Safe mode will be turned off automatically.
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFileInternal(FSNamesystem.java:1220)
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.appendFile(FSNamesystem.java:1426)

 

原因:有一台datanode服务器没有启动,导致The ratio of reported blocks 0.8333小于threshold 0.9990,从而Safe mode will be turned off automatically,无法写文件。

抱歉!评论已关闭.