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

org.approvaltests.hadoop.version1.ReducerWrapper 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.Reducer;

public class ReducerWrapper
    extends
      SmartReducer
{
  private final Class                              keyIn;
  private final Class                            valueIn;
  private final Class                             keyOut;
  private final Class                           valueOut;
  private final Reducer reducer;
  public ReducerWrapper(Reducer reducer, Class keyIn,
      Class valueIn, Class keyOut, Class valueOut)
  {
    this.reducer = reducer;
    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;
  }
  @Override
  public void run(Context context) throws IOException, InterruptedException
  {
    reducer.run(context);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy