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 in Big Data Hadoop by digger
• 26,550 points
86 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 by Omkar
• 67,620 points

Related Questions In Big Data Hadoop

0 votes
1 answer
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,690 points

edited Mar 21, 2018 by nitinrawat895 334 views
0 votes
7 answers

How to run a jar file in hadoop?

I used this command to run my ...READ MORE

answered Dec 10, 2018 in Big Data Hadoop by Dasinto
5,479 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
206 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,690 points
3,023 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,690 points
337 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
14,923 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
• 67,620 points
145 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
• 67,620 points
39 views