hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Jackson <krjack...@lbl.gov>
Subject streaming with custom input format
Date Sun, 18 Oct 2009 02:27:47 GMT
I've written custom input format to use with streaming, but I'm having  
trouble making it work. I pass in -inputformat <input format class>  
and I get the following error:
Exception in thread "main" java.lang.RuntimeException: class  
gov.lbl.acs.FASTAInputFormat not org.apache.hadoop.mapred.InputFormat

I'm using hadoop-0.20.1.

My input format class looks like:
package gov.lbl.acs;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;

public class FASTAInputFormat extends TextInputFormat {

     public RecordReader<LongWritable, Text> createRecordReader 
(InputSplit inputSplit, TaskAttemptContext taskAttemptContext) {
         return new FASTARecordReader();

I'm puzzled as to what I'm doing wrong. Any help would be greatly  
Keith R. Jackson                                     email: KRJackson@lbl.gov
MS: 50B-2239                                         phone: 510-486-4401
Lawrence Berkeley National Lab        url: http://www-itg.lbl.gov/~kjackson/

View raw message