I am modifying an MapReduce program in the Record Reader and wanted to write a test case for mapper to call customised InputFormat or Record Reader. I have modified test case for record reader but the record reader test cases are not an mrunit one.
How to call the customised Record Reader from Mapper, as withInputFormat function is not listed under MapDriver.newMapDriver?
Please find the snapshot of my code:
@Before
public void setUp(){
MapDriver<Object, Text, Text, Text> mapDriver = MapDriver.newMapDriver(new myMapper());
}
@Test
public void testFunction1() throws IOException {
mapDriver.withInput(...).withOutput(...).runTest();
}
Thanks