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 in Big Data Hadoop by Gouri
47 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 by Omkar
• 67,290 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 in Big Data Hadoop by Gitika
• 25,300 points
25 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 9 in Big Data Hadoop by Jimmy
20 views
0 votes
1 answer

Why we use --split by command in Sqoop?

The command --split-by is used to specify the ...READ MORE

answered Apr 11 in Big Data Hadoop by Gitika
• 25,300 points
269 views
0 votes
0 answers

Why we use 'help' command in Hadoop Sqoop?

Use of help command in Hadoop sqoop. READ MORE

Apr 11 in Big Data Hadoop by amrita
23 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,490 points
2,373 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,490 points
241 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
12,097 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,240 points
890 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 20, 2018 in Big Data Hadoop by Omkar
• 67,290 points
33 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
• 67,290 points
31 views