expected org.apache.hadoop.io.IntWritable, received org.apache.hadoop.io.LongWritable

0 votes

Hello. I am facing issue while running MapReduce program. The name of the MapReduce is WordCount which I found in a blog online. When I try to run the program. I am getting the following error:

expected org.apache.hadoop.io.IntWritable, received org.apache.hadoop.io.LongWritable
Jan 25 in Big Data Hadoop by George
126 views
Could you please share the code you are using?

1 answer to this question.

0 votes

Hey George! 

This error comes whenever you use any other serializable datatype for mapper key other than LongWritable. This happens only when using multiple mappers. Please have a look below for your reference.

image

image

image

With the right datatypes, it should work fine. Make the changes shown in the screenshots above and execute the program.

answered Jan 25 by Omkar
• 67,660 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop Pig: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/Filter

This seems like a problem with the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 67,660 points
280 views
0 votes
1 answer

Hadoop: Error: Could not find or load main class org.apache.hadoop.util.VersionInfo

This seems like a path issue. Add the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 67,660 points
2,467 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,710 points
3,321 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,710 points
396 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,365 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,194 views
+2 votes
1 answer
0 votes
1 answer

PIG - Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected

Yes, it is a compatibility issue. in Hadoop ...READ MORE

answered Oct 10, 2018 in Big Data Hadoop by Omkar
• 67,660 points
97 views