Vineet Kaushik Vineet Kaushik - 2 months ago 11
Java Question

hadoop fs -mkdir not creating desired folders

I am trying to execute the simple Hadoop Mapreduce Wordcount example. I am following this guide to run the program.

One of the steps is to create input and output folders on the hdfs file system.

hadoop dfs -mkdir -p /usr/local/hadoop/input


But that gave me this error:


DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

16/09/25 10:57:58 WARN util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes
where applicable


So I tried :

hadoop fs -mkdir -p /usr/local/hadoop/input


Output:


16/09/25 10:59:09 WARN util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes
where applicable


But the input folder has not been created.

What do I do? Please help!

Answer

I suspect the folder is being created as neither of the logs you've posted indicate an error. I think you're just looking in the wrong place.

You should execute the command

hdfs dfs -ls /usr/local/hadoop/

and confirm that the input directory exists there.

You can't find this directory by using the normal Unix ls command.