Example usage for org.apache.hadoop.mapred Reducer interface-usage

List of usage examples for org.apache.hadoop.mapred Reducer interface-usage

Introduction

In this page you can find the example usage for org.apache.hadoop.mapred Reducer interface-usage.

Usage

From source file FriendsReducer.java

/**
 * The Anagram reducer class groups the values of the sorted keys that came in and 
 * checks to see if the values iterator contains more than one word. if the values 
 * contain more than one word we have spotted a anagram.
 * @author subbu
 *

From source file DistribCountingReducer.java

public class DistribCountingReducer extends MapReduceBase implements Reducer<Text, IntWritable, Text, Text> {
    int minFreqPercent;
    int datasetSize;

    @Override
    public void configure(JobConf conf) {

From source file DistribCountingCombiner.java

public class DistribCountingCombiner extends MapReduceBase
        implements Reducer<Text, IntWritable, Text, IntWritable> {
    @Override
    public void reduce(Text itemset, Iterator<IntWritable> values, OutputCollector<Text, IntWritable> output,
            Reporter reporter) throws IOException {
        int sum = 0;

From source file FIMReducer.java

public class FIMReducer extends MapReduceBase implements Reducer<IntWritable, Text, Text, DoubleWritable> {
    private int minFreqPercent;
    private int sampleSize;
    private int id;
    private float epsilon;
    private boolean set;

From source file SleepJob.java

/**
 * Dummy class for testing MR framefork. Sleeps for a defined period 
 * of time in mapper and reducer. Generates fake input for map / reduce 
 * jobs. Note that generated number of input pairs is in the order 
 * of <code>numMappers * mapSleepTime / 100</code>, so the job uses
 * some disk space.

From source file Deducer.java

public class Deducer extends MapReduceBase implements Reducer<Text, Text, Text, Text> {

    public void reduce(Text key, Iterator<Text> values, OutputCollector<Text, Text> output, Reporter reporter)
            throws IOException {
        Set<String> attackers = new TreeSet<String>();
        while (values.hasNext()) {

From source file AnagramReducer.java

/**
 * The Anagram reducer class groups the values of the sorted keys that came in and 
 * checks to see if the values iterator contains more than one word. if the values 
 * contain more than one word we have spotted a anagram.
 * @author subbu
 *

From source file SleepJobWithArray.java

/**
 * Dummy class for testing MR framefork. Sleeps for a defined period 
 * of time in mapper and reducer. Generates fake input for map / reduce 
 * jobs. Note that generated number of input pairs is in the order 
 * of <code>numMappers * mapSleepTime / 100</code>, so the job uses
 * some disk space.

From source file JobBase.java

/**
 * A common base implementing some statics collecting mechanisms that are
 * commonly used in a typical map/reduce job.
 * 
 */
public abstract class JobBase implements Mapper, Reducer {

From source file adept.mapreduce.AdeptReducer.java

public class AdeptReducer extends MapReduceBase implements Reducer<Text, Text, Text, Text> {
    public void reduce(Text key, Iterator<Text> values, OutputCollector<Text, Text> output, Reporter reporter)
            throws IOException {
        while (values.hasNext()) {
            output.collect(key, values.next());
        }