Is it because TableMap and TableReduce are abstract?
St.Ack

Don Branson wrote:
All,

I've been trying to understand why I'm getting this error.  It happens when
JobClient.runJob() is invoked, but before my Map class gets invoked.  In
fact, if I use the Identity map class and/or the Identity reduce class, it
still occurs.  Here's the code:

package com.asolutions.thumbnailer.hbase;

import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.mapred.TableMap;
import org.apache.hadoop.hbase.mapred.TableReduce;
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;

public class Thumbnailer {

    private static final String IMAGES = "images";
    private static final String IMAGE_FAMILY = "imageFamily:";

    protected volatile HBaseConfiguration hbConf;

    public static void main(String[] args) throws IOException {
        new Thumbnailer().run();
    }

    private void run() throws IOException {

        hbConf = new HBaseConfiguration();

        JobConf conf = new JobConf(hbConf, this.getClass());
        conf.setJobName("Thumbnailer (HBase implementation)");

        TableMap.initJob(IMAGES, IMAGE_FAMILY, ThumbnailerMap.class, conf);
        TableReduce.initJob(IMAGES, ThumbnailerReduce.class, conf);

        conf.setMapOutputValueClass(BytesWritable.class);

        JobClient.runJob(conf);
    }

}

and here's the error:

~/apps/hadoop/bin/hadoop jar mapreduce.jar
com.asolutions.thumbnailer.hbase.Thumbnailer

08/08/09 07:17:34 INFO mapred.JobClient: Running job: job_200808081511_0003
08/08/09 07:17:35 INFO mapred.JobClient:  map 0% reduce 0%
08/08/09 07:17:45 INFO mapred.JobClient: Task Id :
task_200808081511_0003_m_000000_0, Status : FAILED
java.lang.AbstractMethodError:
org.apache.hadoop.hbase.mapred.TableInputFormat$TableRecordReader.createKey()Ljava/lang/Object;
        at
org.apache.hadoop.mapred.MapTask$TrackedRecordReader.createKey(MapTask.java:146)
        at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:42)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:219)
        at
org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2124)


Hopefully, I'm making some obvious mistake that someone could point out...


Reply via email to