Upload data to HDFS
Now we are almost ready to run our first Map/Reduce project. The only thing is missing is the data. This section will explain how to upload the data into Hadoop Distributed File System.
Upload Files To HDFS
- Open a new CYGWIN command window.

- Execute the following commands in the new CYGWIN window as shown on the image above.
cd hadoop-0.19.1
bin/hadoop fs -mkdir In
bin/hadoop fs -put *.txt InWhen the last of the above commands will start execution you should see some activity happening in the rest of the hadoop windows as shown on the image below.

The result of these commans is a newly created directory in the HDFS named In which contains a set of text files that comes with the hadoop distribution.
- Close the Cygwin Window.
Verify if the files were uploaded correctly
In the section we will check if the files were uploaded correctly.
-
Open Eclipse Environment
- Open DFS locations folder which is located in Project Explorer tab of Map/Reduce perspective.
- Open localhost folder which is contain in the DFS locations folder
- Keep opening HDFS folders until you navigate to the newly created In directory. As shown on the image below.
Verifying that the data was uploaded correctly
- When you get to the In directory double-click on the file LICENCE.TXT to open it.
- If you see something similar to the image above then the data was uploaded correctly and we can proceed to creating our first Hadoop project.
If you have questions comments suggestions regarding this tutorial you can post them here or you can write me an email to tutorials AT v-lad.org.