我已登录“hduser”因此我认为/ home / hduser“预先存在为Unix fs.所以我尝试使用下面的命令创建hadoop目录.
[hduser@Virus ~]$hadoop fs -mkdir /home/hduser/mydata/ 14/12/03 15:04:53 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable mkdir: `/home/hduser/mydata/': No such file or directory
在线搜索后,我想到hadoop可能无法理解“/ home / hduser”或者我使用hadoop2,其中mkdir不会像Unix命令“madir -p”那样工作(递归).因此我试图创建“/ mydata”但没有运气.
[hduser@Virus ~]$hadoop fs -mkdir /mydata 14/12/03 15:09:26 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable mkdir: Cannot create directory /mydata. Name node is in safe mode.
我试图离开安全模式,但仍然存在问题.
[hduser@Virus ~]$hdfs dfsadmin -safemode leave 14/12/03 15:09:13 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Safe mode is OFF
我也试过“/ user / mydata”,因为“/ user”是hadoop作为主页的目录.
[hduser@Virus ~]$hadoop fs -mkdir /user/mydata 14/12/03 15:36:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable mkdir: Cannot create directory /user/mydata. Name node is in safe mode.
现在如何进一步调试?