问题
I'm trying to install hadoop 2.7.1 (standalone mode) on Ubuntu Server 14.04.3 LTS. Following the main apache tutorial (https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html), I can start the process and see the dfshealth.html#tab-datanode at port 50070. But I can't go through beyond that point. I'm stuck on: "Copy the input files into the distributed filesystem:" ($ bin/hdfs dfs -put etc/hadoop input) The file is there but I'm getting the following exception:
joao@vmdeb20:~/hadoop2_7_1/hadoop-2.7.1$ bin/hdfs dfs -put input
put: `.': No such file or directory
回答1:
This is because the user directory not found. Hadoop will copy the input into the user directory /user/username by default if the output directory does not specified.
Either create a user directory in Hadoop or copy the file using below command
bin/hdfs dfs -put input /
The above command will copy the input directory into root (/) of HDFS.
来源:https://stackoverflow.com/questions/32132233/hadoop-does-not-see-the-input-folder