错误Cannot create directory /user/zkpk/QuasiMonteCarlo_*_*/in. Name node is in safe

来源:互联网 发布:日本基因 知乎 编辑:程序博客网 时间:2024/06/07 07:08

hadoop运行pi实例报错

$ hadoop jar hadoop-mapreduce-examples-2.5.2.jar pi 10 10Number of Maps  = 10Samples per Map = 1017/04/19 22:38:33 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableorg.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create directory /user/zkpk/QuasiMonteCarlo_1492655909918_1510921758/in. Name node is in safe mode.The reported blocks 15 needs additional 30 blocks to reach the threshold 0.9990 of total blocks 45.The number of live datanodes 2 has reached the minimum number 0. Safe mode will be turned off automatically once the thresholds have been reached.

这里说Name node is in safe mode.
查了下网上,说是因为安全模式开启了,关掉就好。
#查看安全模式是否开启

$ hadoop dfsadmin -safemode getDEPRECATED: Use of this script to execute hdfs command is deprecated.Instead use the hdfs command for it.17/04/19 22:50:57 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableSafe mode is ON

#关闭安全模式

$ hadoop dfsadmin -safemode leaveDEPRECATED: Use of this script to execute hdfs command is deprecated.Instead use the hdfs command for it.17/04/19 22:51:45 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableSafe mode is OFF

参考:http://blog.csdn.net/xw13106209/article/details/6866072

0 0
原创粉丝点击