incubator-mrunit-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Mak <>
Subject Unit testing for hbase mapreduce mapper
Date Tue, 13 Mar 2012 01:30:35 GMT

I can find resource on how to unit test using Mrunit for a class that implements a Mapper
or Reducer, but how can test the following map() method of MyMapper which extends the TableMapper,
which reads from hbase?
Is it possible to unit test MyMapper below? Any pointers will be very helpful :)

import org.apache.hadoop.hbase.mapreduce.TableMapper;

public class MyMapper extends
                TableMapper<ImmutableBytesWritable, DoubleWritable> {
        protected void map(
                        ImmutableBytesWritable key,
                        org.apache.hadoop.hbase.client.Result result,
                        org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable, org.apache.hadoop.hbase.client.Result,
ImmutableBytesWritable, DoubleWritable>.Context context)
                        throws, InterruptedException {

Please reply to:

Thanks you so much.

Kind Regards,
Anthony Mak

View raw message