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
81 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,200 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,200 points
157 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,200 points
1,383 views
0 votes
1 answer

Hadoop Apache: Could not fully initialize service [org.apache.oozie.service.ShareLibService]

As mentioned in the error, the problem ...READ MORE

answered Nov 19, 2018 in Big Data Hadoop by Omkar
• 67,200 points
38 views
0 votes
1 answer

Hadoop Java: org.apache.hadoop.conf.Configuration does not exist error

To solve this error, add hadoop-common to ...READ MORE

answered Nov 20, 2018 in Big Data Hadoop by Omkar
• 67,200 points
517 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,210 points
2,086 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,210 points
202 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
10,706 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
779 views
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,200 points
58 views