I am trying to do a WordCount using Hadoop. I want to use XmlInputFormat.class to split the file base on XML tag. The XmlInputFormat.class is here
XmlInputFormat.class is extends from TextInputFormat.class
Job job = new Job(getConf());
job.setInputFormatClass(XmlInputFormat.class);
It shows the error
The method setInputFormatClass(Class) in the type Job is not applicable for the arguments (Class)
But it's OK when I use
Job job = new Job(getConf());
job.setInputFormatClass(TextInputFormat.class);
Why can't we use the extends one? Or did I do something wrong?