16

到目前为止,我一直遵循 michael-noll 的指南,但被困在这里。

hduser@ubuntu:/usr/local/hadoop$ bin/hadoop dfs -copyFromLocal /tmp/gutenberg /user/hduser/gutenberg
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

13/11/11 23:24:13 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
copyFromLocal: `/user/hduser/gutenberg': No such file or directory

hduser@ubuntu:/usr/local/hadoop$

我尝试使用“Y”重新格式化名称节点,但对于任意文件夹名称每次都得到相同的结果。

有任何想法吗?

4

3 回答 3

27

通过使用如下命令解决它:

hduser@ubuntu:/usr/local/hadoop$ hdfs dfs -mkdir -p /user/hduser  
于 2013-11-12T18:12:29.887 回答
2

Hadoop 2.4.1

hadoop fs -mkdir -p /user/hduser/sample
于 2014-08-12T06:58:08.760 回答
2

对于 Hadoop 2.6.0:

用法:hadoop fs -mkdir 路径

示例:
hadoop/bin fs -mkdir /user/hduser

参考:http ://hortonworks.com/hadoop-tutorial/using-commandline-manage-files-hdfs/

于 2015-07-12T11:29:43.997 回答