All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.approvaltests.hadoop.version1.MapperWrapper Maven / Gradle / Ivy

There is a newer version: 9.5.0
Show newest version
package org.approvaltests.hadoop.version1;

import java.io.IOException;

import org.apache.hadoop.mapreduce.Mapper;

public class MapperWrapper extends SmartMapper
{
  private final Class                             keyIn;
  private final Class                           valueIn;
  private final Class                            keyOut;
  private final Class                          valueOut;
  private final Mapper mapper;
  public MapperWrapper(Mapper mapper, Class keyIn, Class valueIn,
      Class keyOut, Class valueOut)
  {
    this.mapper = mapper;
    this.keyIn = keyIn;
    this.valueIn = valueIn;
    this.keyOut = keyOut;
    this.valueOut = valueOut;
  }
  @Override
  public Class getKeyInType()
  {
    return keyIn;
  }
  @Override
  public Class getValueInType()
  {
    return valueIn;
  }
  @Override
  public Class getKeyOutType()
  {
    return keyOut;
  }
  @Override
  public Class getValueOutType()
  {
    return valueOut;
  }
  @SuppressWarnings({"rawtypes", "unchecked"})
  @Override
  public void run(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
  {
    mapper.run(context);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy