Why should we use extends Mapper for Mapreduce code

0 votes

I am practicing MapReduce and going through some code. My question is, why do we use the extends keyword. i.e MyMapper extends Mapper. extends is meant for the keyword of inheritance in Java, then why we use it here?

Feb 8, 2019 in Big Data Hadoop by Gouri
1,065 views

1 answer to this question.

0 votes

The Mapper class belongs to package org.apache.hadoop.mapreduce and map function is a function of Mapper class so whenever you want to use any function of Mapper class you will be extending mapper class as parent class where MyMapper acts as a child class.

answered Feb 8, 2019 by Omkar
• 69,220 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Why should we use "distinct" keyword in pig script?

Hey, The "distinct" statement is very simple. It ...READ MORE

answered May 3, 2019 in Big Data Hadoop by Gitika
• 65,770 points
773 views
0 votes
1 answer

Can we use different i/p and o/p format classes in mapreduce code?

Yes, InputFormatClass and OutputFormatClass are independent of ...READ MORE

answered Jul 10, 2019 in Big Data Hadoop by Jimmy
822 views
0 votes
2 answers

Why we use --split by command in Sqoop?

In simple explanation, When specify SPLIT_BY only ...READ MORE

answered Feb 6, 2020 in Big Data Hadoop by Ramji Sridaran
15,107 views
0 votes
1 answer

Why we use 'help' command in Hadoop Sqoop?

Hi, The command sqoop help lists the tools ...READ MORE

answered Feb 4, 2020 in Big Data Hadoop by MD
• 95,460 points
895 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
11,015 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,528 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
108,740 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,350 points
4,605 views
0 votes
1 answer

In Hadoop MapReduce, how can i set an Object as the Value for Map output?

Try this and see if it works: public ...READ MORE

answered Nov 21, 2018 in Big Data Hadoop by Omkar
• 69,220 points
971 views
0 votes
1 answer

Hadoop MapReduce wordcount "type job is not applicable for the arguments" error

The combiner class is not required in ...READ MORE

answered Dec 19, 2018 in Big Data Hadoop by Omkar
• 69,220 points
820 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