public class PrimeMapper extends Mapper<LongWritable,IntWritable,IntWritable,NullWritable>
{
public void map(LongWritable k,IntWritable val,Context c) throws IOException, InterruptedException
{
int v=val.get();
int i=2;
if(v==1)
c.write(new IntWritable(v), NullWritable.get());
for(i=2;i<v;i++)
{
if(v%i==0)
break;
}
if(v==i)
c.write(new IntWritable(v),NullWritable.get());
}
}
when i am trying to run this code i getting error of typecasting error .