Pig code in Eclipse shows error LongWritable cannot be resolved to a type

–1 vote

I am getting the below errors on many lines in eclipse. Please assist

Multiple markers at this line
- LongWritable cannot beresolved 
to a type
- Mapper cannot be resolved to a 
type
- Text cannot be resolved to a type
- Text cannot be resolved to a type
- Text cannot be resolved to a type
Jan 2, 2019 in Big Data Hadoop by digger
• 26,740 points
1,830 views

1 answer to this question.

0 votes

To rectify this errors, you need to import the respective packages. Add the below statements in your program and the errors will be resolved,

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
answered Jan 2, 2019 by Omkar
• 69,220 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

Is data sent to some other location to be processed in pig?

With pig, we are not taking data ...READ MORE

answered Jul 10, 2019 in Big Data Hadoop by Adi
730 views
+1 vote
2 answers

How to find previous records from a data set in Pig??

Hi, You can use ToDate() and SubtractDuration() function ...READ MORE

answered Jan 23, 2020 in Big Data Hadoop by MD
• 95,460 points
1,426 views
0 votes
1 answer

How to create a FileSystem object that can be used for reading from and writing to HDFS?

Read operation on HDFS In order to read ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points

edited Mar 22, 2018 by nitinrawat895 3,037 views
0 votes
1 answer

What do we exactly mean by “Hadoop” – the definition of Hadoop?

The official definition of Apache Hadoop given ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by Shubham
1,874 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,029 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,538 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,836 views
0 votes
1 answer

MapReduce "cannot be resolved to a type" error

One of the reasons could be different ...READ MORE

answered Dec 18, 2018 in Big Data Hadoop by Omkar
• 69,220 points
1,600 views
0 votes
1 answer

Is it possible to start a zookeeper server instance in process?

To start ZooKeeper you have to execute ZooKeeperServerMain class. You can use ...READ MORE

answered Oct 9, 2018 in Big Data Hadoop by Omkar
• 69,220 points
735 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