Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop >> mail # user >> The method setMapperClass(Class<? extends Mapper>) in the type Job is not applicable for the arguments


Copy link to this message
-
The method setMapperClass(Class<? extends Mapper>) in the type Job is not applicable for the arguments
Hi All,

I hope this is the right forum for this type of question so my apologies if
not.

I'm looking to write a map reduce program which is giving me the following
compilation error:
The method setMapperClass(Class<? extends Mapper>) in the type Job is not
applicable for the arguments (Class<csatAnalysis.MapClass>)

The components involved are:

1. Setting the Mapper
        //Set the Mapper for the job. Calls MapClass.class
        job.setMapperClass(MapClass.class);

2. Setting the inputFormat to TextInputFormat
        //An InputFormat for plain text files. Files are broken into lines.
        //Either linefeed or carriage-return are used to signal end of
line.
        //Keys are the position in the file, and values are the line of
text..
        job.setInputFormatClass(TextInputFormat.class);

3. Taking the data into the mapper and processing it
    public static class MapClass extends Mapper<LongWritable, Text, Text,
VectorWritable> {
        public void map (LongWritable key, Text value,Context context)
throws IOException, InterruptedException {

Would anyone have any clues as to what would be wrong with the arguements
being passed to the Mapper?

Any help would be appreciated,

Thanks.
+
Harsh J 2013-02-09, 18:09
+
Ronan Lehane 2013-02-09, 18:17
+
Harsh J 2013-02-09, 18:35
+
Ronan Lehane 2013-02-09, 18:40
+
Ronan Lehane 2013-02-09, 18:44