From the course: Data Science Tools of the Trade: First Steps

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Hadoop: MapReduce hands-on

Hadoop: MapReduce hands-on

From the course: Data Science Tools of the Trade: First Steps

Start my 1-month free trial

Hadoop: MapReduce hands-on

- [Instructor] Let's test our Hadoop installation by running a simply Java program on it. This program uses MapReduce as its processing engine and reports the frequencies of words appearing in a text file. It specifies a class called TokenizerMapper which extends the mapper class defined in Hadoop MapReduce. The TokenizerMapper reads a text and produces a key value pair like hello, one. The second class is IntSumReducer which extends the reducer class defined in Hadoop MapReduce. All it does is to combine and reduce the results provided by the TokenizerMapper class. Now, let's try to run this program on Hadoop. First, create a new directory called wdct under/user/local/ hadoop/bin as I did here. Next, create a file called word count to Java. I already created the file and the directory. Let's see if it's there. Type ls. Copy the program from the Hadoop tutorial website. You can see the content of the word count that Java file by typing more WordCount.Java. Press q, and let's clear the…

Contents