de.kumpe.hadooptimizer.examples.painting
Class SvgRenderer.SvgRendererMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.ObjectWritable>
      extended by de.kumpe.hadooptimizer.examples.painting.SvgRenderer.SvgRendererMapper
Enclosing class:
SvgRenderer

public static class SvgRenderer.SvgRendererMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.ObjectWritable>

The Mapper to do the actual work. See SvgRenderer for details. *

Author:
Christian Kumpe

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
SvgRenderer.SvgRendererMapper()
           
 
Method Summary
protected  void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper.Context context)
          Parses the given line and if the best result of every 1000th cycle, create an SVG-image and write the parsed double-values into the output.
protected  void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SvgRenderer.SvgRendererMapper

public SvgRenderer.SvgRendererMapper()
Method Detail

setup

protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
              throws IOException,
                     InterruptedException
Overrides:
setup in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.ObjectWritable>
Throws:
IOException
InterruptedException

map

protected void map(org.apache.hadoop.io.LongWritable key,
                   org.apache.hadoop.io.Text value,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Parses the given line and if the best result of every 1000th cycle, create an SVG-image and write the parsed double-values into the output.

Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.ObjectWritable>
Throws:
IOException
InterruptedException


Copyright © 2011 Christian Kumpe. All Rights Reserved.