com.cloudera.sqoop.mapreduce
Class SequenceFileImportMapper

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,SqoopRecord,org.apache.hadoop.io.LongWritable,SqoopRecord>
          extended by com.cloudera.sqoop.mapreduce.SequenceFileImportMapper

public class SequenceFileImportMapper
extends AutoProgressMapper<org.apache.hadoop.io.LongWritable,SqoopRecord,org.apache.hadoop.io.LongWritable,SqoopRecord>

Imports records by writing them to a SequenceFile.


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
SequenceFileImportMapper()
           
 
Method Summary
protected  void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
           
 void map(org.apache.hadoop.io.LongWritable key, SqoopRecord 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceFileImportMapper

public SequenceFileImportMapper()
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,SqoopRecord,org.apache.hadoop.io.LongWritable,SqoopRecord>
Throws:
java.io.IOException
java.lang.InterruptedException

map

public void map(org.apache.hadoop.io.LongWritable key,
                SqoopRecord 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,SqoopRecord,org.apache.hadoop.io.LongWritable,SqoopRecord>
Throws:
java.io.IOException
java.lang.InterruptedException

cleanup

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


Copyright © 2010 Cloudera, Inc.