我是hadoop的新手。我正在嘗試在hdfs中創建一個目錄,但我無法創建。在hadoop文件系統中創建目錄
我已經登錄到「hduser」因此我假設的/ home/hduser」預先存在作爲Unix的FS,所以我嘗試使用以下命令來創建Hadoop的目錄。
[[email protected] ~]$ 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」,但是沒有
[[email protected] ~]$ 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.
我試着離開安全模式但仍然存在問題
[[email protected] ~]$ 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作爲home的目錄。
[[email protected] ~]$ 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.
現在如何進一步調試?
您的名字節點尚未離開安全mode.http://unmeshasreeveni.blogspot.in/2014/04/name-node-is-in-safe-模式如何對leave.html – 2014-12-03 10:12:08