org.approvaltests.hadoop.version1.ReducerWrapper Maven / Gradle / Ivy
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);
}
}