Package org.apache.hadoop.mrunit.mapreduce

Examples of org.apache.hadoop.mrunit.mapreduce.MapReduceDriver.run()


    writableKey = createWritable(key, mapper.getKeyInType());
    writableValue = createWritable(input, mapper.getValueInType());
    mapReduceDriver.withInput(writableKey, writableValue);
    mapReduceDriver.setMapper(mapper);
    mapReduceDriver.setReducer(reducer);
    List finalResults = mapReduceDriver.run();
    String text = String.format(
        "[%s]\r\n\r\n -> maps via %s to -> \r\n\r\n%s\r\n\r\n -> reduces via %s to -> \r\n\r\n%s", input, mapper
            .getClass().getSimpleName(), ArrayUtils.toString(results, Echo.INSTANCE), reducer.getClass()
            .getSimpleName(), ArrayUtils.toString(finalResults, Echo.INSTANCE));
    Approvals.verify(text);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.