List of usage examples for org.apache.hadoop.mapred MapReduceBase subclass-usage
From source file crimeScoreMapper.java
public class crimeScoreMapper extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable> { public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { StringTokenizer tokenizer = new StringTokenizer(value.toString(), ",");
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 BinomialSamplerMapper.java
public class BinomialSamplerMapper extends MapReduceBase implements Mapper<LongWritable, Text, IntWritable, Text> { private int reducersNum; private int datasetSize; @Override public void configure(JobConf conf) {
From source file DistribCountingMapper.java
public class DistribCountingMapper extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable> { @Override public void map(LongWritable lineNum, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { IntWritable one = new IntWritable(1); HashSet<String> transactionItems = new HashSet<String>();
From source file PartitionMapper.java
public class PartitionMapper extends MapReduceBase implements Mapper<LongWritable, Text, IntWritable, Text> { private int reducersNum; @Override public void configure(JobConf conf) { reducersNum = conf.getInt("PARMM.reducersNum", 64);
From source file RandIntPartSamplerMapper.java
public class RandIntPartSamplerMapper extends MapReduceBase implements Mapper<NullWritable, TextArrayWritable, IntWritable, Text> { private int id; private int reducersNum; private int toSample; private IntWritable[] sampleDestinations;
From source file CoinFlipSamplerMapper.java
public class CoinFlipSamplerMapper extends MapReduceBase implements Mapper<LongWritable, Text, IntWritable, Text> { private int reducersNum; private 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 AnagramMapper.java
/**
* The Anagram mapper class gets a word as a line from the HDFS input and sorts the
* letters in the word and writes its back to the output collector as
* Key : sorted word (letters in the word sorted)
* Value: the word itself as the value.
* When the reducer runs then we can group anagrams togather based on the sorted key.