Database Reference
In-Depth Information
Loading Data
The first thing you need to do is load a data file. You can download a sample
highway traffic data file at www.wiley.com/go/microsoftbigdatasolutions .
Once the data file is downloaded, you can load it into HDFS using the
Hadoop command-line console. Open the console and create a directory for
the file using the following code:
hadoop fs -mkdir /user/test
Next, use the following command to load the traffic.txt file into the
directory:
Hadoop fs -copyFromLocal C:\SampleData\traffic.txt
/user/test
Once the file is copied into the Hadoop directory, you should be able to
browsetothedirectoryandviewthedatausingtheHadoopNameNodelink.
Figure 9.6 shows the file open in the NameNode browser.
Figure 9.6 Viewing the traffic.txt data
 
 
Search WWH ::




Custom Search