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,350 points
932 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
• 69,210 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,740 points
12,988 views
0 votes
1 answer

How to run Hadoop in Docker containers?

Hi, You can run Hadoop in Docker container. Follow ...READ MORE

answered Jan 24, 2020 in Big Data Hadoop by MD
• 95,440 points
1,771 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
25,530 views
+1 vote
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
• 11,380 points
10,556 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
• 11,380 points
2,184 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
104,201 views
–1 vote
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,390 points
4,260 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 ...READ MORE

answered Dec 5, 2018 in Big Data Hadoop by Rio
1,515 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
• 69,210 points
2,029 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP