java - Setting custom file format class in mapreduce job -


i extended fileinputformat xmlfileinputformat. problem when set class on job

job.setinputformatclass(xmlfileinputformat.class); 

i error telling expects class extend or.apache.hadoop.mapreduce.inputformat (but checked fileinputformat implements inputformat)

this class set way

public class xmlfileinputformat extends fileinputformat<nullwritable, byteswritable> {      @override     protected boolean issplitable(filesystem fs, path filename) {         return false; }      @override     public recordreader<nullwritable, byteswritable> getrecordreader(             inputsplit split, jobconf job, reporter reporter) throws ioexception {         return new xmlfilerecordreader((filesplit) split, job);     } } 

how can set correctly inputformat ?

please verify package structure in import statement. should org.apache.hadoop.mapreduce.fileinputformat.

you have imported: org.apache.hadoop.mapred.fileinputformat


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -