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

0 votes

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
• 27,620 points
50 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,140 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,150 points

edited Mar 21, 2018 by nitinrawat895 213 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
4,041 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
153 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,150 points
2,063 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,150 points
200 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,579 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,140 points
71 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,140 points
33 views