Example usage for org.apache.hadoop.mapreduce Mapper subclass-usage

List of usage examples for org.apache.hadoop.mapreduce Mapper subclass-usage

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce Mapper subclass-usage.

Usage

From source file com.jeffy.mr.WordCountMapper.java

/**
 * @author Jeffy<renwu58@gmail.com>
 * ?? 
 *  
 */
public class WordCountMapper extends Mapper<LongWritable, Text, Text, IntWritable> {

From source file com.jhkt.playgroundArena.hadoop.tasks.jobs.mapper.AverageMapper.java

/**
 * @author Ji Hoon Kim
 */
public final class AverageMapper extends Mapper<Text, Text, Text, AverageWritable> {

    private AverageWritable _aWriter = new AverageWritable();

From source file com.jhkt.playgroundArena.hadoop.tasks.jobs.mapper.BloomFilterMapper.java

/**
 * Recall that our strategy for the mapper is to build a single Bloom filter on the entire split and output 
 * it at the end of the split to the reducer. Given that the map() method of the Mapper class has no state 
 * information about which record in the split it's processing, we should output the BloomFilter in the close() method 
 * to ensure that all the records in the split have been read.
 * 

From source file com.jhkt.playgroundArena.hadoop.tasks.jobs.mapper.CountMapper.java

/**
 * The reason for defining currentValue and ONE in the class rather than inside the method is purely one of efficiency. The map() method 
 * will be called as many times as there are records (in a split, for each JVM). Reducing the number of objects created inside the 
 * map() method can increase performance and reduce garbage collection.
 * 
 * @author JihoonKim

From source file com.jhkt.playgroundArena.hadoop.tasks.jobs.mapper.DistributedCacheMapper.java

/**
 * @author Ji Hoon Kim
 */
public final class DistributedCacheMapper extends Mapper<Text, Text, Text, Text> {

    private ConcurrentMap<String, String> joinData = new ConcurrentHashMap<String, String>();

From source file com.jhkt.playgroundArena.hadoop.tasks.jobs.mapper.ReverseMapper.java

/**
 * @author Ji Hoon Kim
 */
public final class ReverseMapper extends Mapper<Text, Text, Text, Text> {

    private Text _value = new Text();

From source file com.jumptap.h2redis.RedisOutputMapper.java

public class RedisOutputMapper extends Mapper<LongWritable, Text, Text, Text> {
    private Text outkey = new Text();
    private Text outvalue = new Text();

    @Override
    public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {

From source file com.justgiving.raven.kissmetrics.jsonenricher.KissmetricsJsonToEnrichedJsonMapper.java

/****
 * This mapper takes in a json rows, parses the elements based on a predefined schema into a tab sperated file
 * it emits the email and/ID as key and the full tsv as value
 * 
 * @author rfreeman
 *

From source file com.justgiving.raven.kissmetrics.schema.KissmetricsJsonToSchemaMapper.java

public class KissmetricsJsonToSchemaMapper extends Mapper<LongWritable, Text, Text, Text> {

    @Override
    public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        String s = value.toString();
        JSONParser jsonParser = new JSONParser();

From source file com.jyz.study.hadoop.mapreduce.datajoin.DataJoinMapperBase.java

/**
 * This abstract class serves as the base class for the mapper class of a data
 * join job. This class expects its subclasses to implement methods for the
 * following functionalities: 1. Compute the source tag of input values 2.
 * Compute the map output value object 3. Compute the map output key object The
 * source tag will be used by the reducer to determine from which source (which