How to execute wordcount in Hadoop?

0 votes
Hey. I have come across the wordcount example in Hadoop a lot of times but I don't know how to execute it. Can someone help me with the steps?
Dec 19, 2018 in Big Data Hadoop by slayer
• 29,170 points
100 views

1 answer to this question.

0 votes

Follow these steps:

Step 1: 

Import all these hadoop libraries in your eclipse.

https://drive.google.com/open?id=1oqVVeEqSCFYdlKj9Zgluanjb7Gpn0SVb

Step 2:

Write your map reduce code in your eclipse and export a jar file .

Step 3:

Now using your ftp option copy these files to your My Lab server.

- wc.jar(the jar that you created)

- wordcountproblem dataset

Step 3:

Open webconsole and fire ls command in it and find these files.

Step 4: 

Copy that wordcountproblem file to hdfs with this command.

hadoop dfs -copyFromLocal wordcountproblem /user/edureka_334301

Step 5:

Now use the command shown below for execution of map reduce code.

hadoop jar wc.jar com.training.practice.wordcount /user/wordcountproblem /user/wcout

Step 6:

And check the results using the command as shown below.

hadoop dfs -cat /user/wcount/part-r-00000

answered Dec 19, 2018 by Omkar
• 67,660 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to execute python script in hadoop file system (hdfs)?

If you are simply looking to distribute ...READ MORE

answered Sep 19, 2018 in Big Data Hadoop by digger
• 26,550 points
2,437 views
0 votes
0 answers

How to run Hadoop in Docker containers?

I want to incorporate Hadoop in Docker ...READ MORE

Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 10,730 points
95 views
0 votes
7 answers

How to run a jar file in hadoop?

I used this command to run my ...READ MORE

answered Dec 10, 2018 in Big Data Hadoop by Dasinto
6,117 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,730 points
3,371 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,730 points
406 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
16,755 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
1,225 views
0 votes
3 answers

How to specify KeyValueTextInputFormat Separator in Hadoop-.20 api?

conf.set("key.value.separator.in.input.line", ","); Job job = new J ...READ MORE

answered Dec 4, 2018 in Big Data Hadoop by Rio
220 views
0 votes
1 answer

Hadoop: How to keep duplicates in Hive using collect_set()?

SELECT hash_id, COLLECT_LIST(num_of_cats) AS ...READ MORE

answered Nov 2, 2018 in Big Data Hadoop by Omkar
• 67,660 points
343 views