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

Switch to Threaded View
Pig >> mail # dev >> Problem writing LoadFunc - why can't I use a sub-class of FileInputFormat as my InputFormat?


Copy link to this message
-
Problem writing LoadFunc - why can't I use a sub-class of FileInputFormat as my InputFormat?
I am writing a LoadFunc called ArcFileReader to load Common Crawl data in
ArcFile format. There is already a ArcRecord, ArcRecordReader and
ArcInputFormat for Hadoop.

ArcInputFormat extends Hadoop's FileInputFormat, which implements Hadoop's
InputFormat interface. Why then can't I specify ArcInputFormat as my
InputFormat in my LoadFunc?

    @Override
    public InputFormat getInputFormat() throws IOException {
        return new ArcInputFormat();
    }
Java complains - attempting to use incompatible return type. What gives?

--
Russell Jurney twitter.com/rjurney [EMAIL PROTECTED] datasyndrome.com