Package org.apache.hadoop.mrunit.mapreduce.mock

Examples of org.apache.hadoop.mrunit.mapreduce.mock.MockMapContextWrapper


  public List<Pair<K2, V2>> run() throws IOException {
    List<Pair<K1, V1>> inputs = new ArrayList<Pair<K1, V1>>();
    inputs.add(new Pair<K1, V1>(inputKey, inputVal));

    try {
      MockMapContextWrapper<K1, V1, K2, V2> wrapper = new MockMapContextWrapper();
      MockMapContextWrapper<K1, V1, K2, V2>.MockMapContext context =
          wrapper.getMockContext(configuration, inputs, getCounters());

      myMapper.run(context);
      return context.getOutputs();
    } catch (InterruptedException ie) {
      throw new IOException(ie);
View Full Code Here


  public List<Pair<K2, V2>> run() throws IOException {
    List<Pair<K1, V1>> inputs = new ArrayList<Pair<K1, V1>>();
    inputs.add(new Pair<K1, V1>(inputKey, inputVal));

    try {
      MockMapContextWrapper<K1, V1, K2, V2> wrapper = new MockMapContextWrapper();
      MockMapContextWrapper<K1, V1, K2, V2>.MockMapContext context =
          wrapper.getMockContext(inputs, getCounters(), getConfiguration());

      myMapper.run(context);
      return context.getOutputs();
    } catch (InterruptedException ie) {
      throw new IOException(ie);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mrunit.mapreduce.mock.MockMapContextWrapper

Copyright © 2018 www.massapicom. 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.