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,660 points
134 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
• 68,840 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
37 views
0 votes
0 answers

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

Hi everyone I'm trying to find previous records ...READ MORE

1 day ago in Big Data Hadoop by Nadeem
• 130 points
13 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
• 10,840 points

edited Mar 21, 2018 by nitinrawat895 454 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
299 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
• 10,840 points
3,838 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,840 points
521 views
+1 vote
11 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
20,308 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
• 68,840 points
239 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
• 68,840 points
51 views