GaActiveTotalReducer.java 652 Bytes
Newer Older
wang-jinfeng committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
package mobvista.dmp.datasource.ga.mapreduce.reduce;

import mobvista.dmp.datasource.ga.mapreduce.vo.TextPair;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 *
 * Created by fl on 2017/4/26.
 */
public class GaActiveTotalReducer extends Reducer<TextPair, Text, NullWritable, Text> {

    @Override
    protected void reduce(TextPair key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
        for (Text val : values) {
            context.write(NullWritable.get(), val);
            break;
        }
    }
}