com.cloudera.sqoop.mapreduce
Class TextExportMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<KEYIN,VALIN,KEYOUT,VALOUT>
      extended by com.cloudera.sqoop.mapreduce.AutoProgressMapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,SqoopRecord,org.apache.hadoop.io.NullWritable>
          extended by com.cloudera.sqoop.mapreduce.TextExportMapper

public class TextExportMapper
extends AutoProgressMapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,SqoopRecord,org.apache.hadoop.io.NullWritable>

Converts an input record from a string representation to a parsed Sqoop record and emits that DBWritable to the OutputFormat for writeback to the database.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Field Summary
 
Fields inherited from class com.cloudera.sqoop.mapreduce.AutoProgressMapper
LOG, MAX_PROGRESS_PERIOD_KEY, REPORT_INTERVAL_KEY, SLEEP_INTERVAL_KEY
 
Constructor Summary
TextExportMapper()
           
 
Method Summary
 void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text val, org.apache.hadoop.mapreduce.Mapper.Context context)
           
protected  void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class com.cloudera.sqoop.mapreduce.AutoProgressMapper
run
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextExportMapper

public TextExportMapper()
Method Detail

setup

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

map

public void map(org.apache.hadoop.io.LongWritable key,
                org.apache.hadoop.io.Text val,
                org.apache.hadoop.mapreduce.Mapper.Context context)
         throws java.io.IOException,
                java.lang.InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,SqoopRecord,org.apache.hadoop.io.NullWritable>
Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2010 Cloudera, Inc.