diff options
Diffstat (limited to 'mapreduce/Mapper.java')
-rw-r--r-- | mapreduce/Mapper.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mapreduce/Mapper.java b/mapreduce/Mapper.java new file mode 100644 index 0000000..c2da326 --- /dev/null +++ b/mapreduce/Mapper.java @@ -0,0 +1,22 @@ +package mapreduce; + +import java.util.Map; +import java.util.concurrent.RecursiveTask; + +/** + * + * @author mph + * @param <IN> input type + * @param <K> key type + * @param <V> accumulator type + */ +public abstract class Mapper<IN, K, V> extends RecursiveTask<Map<K, V>> { + protected IN input; + + /** + * @param anInput list of input items + */ + public void setInput(IN anInput) { + input = anInput; + } +} |