incubator-mrunit-user mailing list archives

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

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 java.io.IOException, InterruptedException {

Please reply to:
  anthony.mak@optus.com.au

Thanks you so much.

Kind Regards,
Anthony Mak

Mime
View raw message