com.ebay.erl.mobius.core.mapred
Class DefaultSeqFileMapper

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by com.ebay.erl.mobius.core.datajoin.DataJoinMapper<IK,IV,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.WritableComparable<?>>
          extended by com.ebay.erl.mobius.core.mapred.AbstractMobiusMapper<K,V>
              extended by com.ebay.erl.mobius.core.mapred.SequenceFileMapper<org.apache.hadoop.io.NullWritable,Tuple>
                  extended by com.ebay.erl.mobius.core.mapred.DefaultSeqFileMapper
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.NullWritable,Tuple,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.WritableComparable<?>>

public class DefaultSeqFileMapper
extends SequenceFileMapper<org.apache.hadoop.io.NullWritable,Tuple>

A default implementation of SequenceFileMapper supporting sequence file with NullWritable as its key type and Tuple as its value type. Any other type throws IllegalArgumentException in the #parse(Writable, Writable) method.

This product is licensed under the Apache License, Version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0. This product contains portions derived from Apache hadoop which is licensed under the Apache License, Version 2.0, available at http://hadoop.apache.org. © 2007 – 2012 eBay Inc., Evan Chiu, Woody Zhou, Neel Sundaresan


Field Summary
 
Fields inherited from class com.ebay.erl.mobius.core.mapred.AbstractMobiusMapper
_100MB, _COUNTER_FILTERED_RECORD, _COUNTER_INPUT_RECORD, _COUNTER_INVALIDATE_FORMAT_RECORD, _COUNTER_OUTPUT_RECORD, _IS_MAP_ONLY_JOB, computedColumns, counterThread, currentDatasetID, dataset_display_id, key_columns, projection_order, reporterSet, tuple_criteria, value_columns
 
Fields inherited from class com.ebay.erl.mobius.core.datajoin.DataJoinMapper
conf, hasReducer
 
Constructor Summary
DefaultSeqFileMapper()
           
 
Method Summary
 Tuple parse(org.apache.hadoop.io.NullWritable inkey, Tuple invalue)
          read the invalue and set the schema to the returned Tuple.
 
Methods inherited from class com.ebay.erl.mobius.core.mapred.SequenceFileMapper
getSchema
 
Methods inherited from class com.ebay.erl.mobius.core.mapred.AbstractMobiusMapper
close, configure, get, getDatasetID, joinmap, outputRecords, updateCounter
 
Methods inherited from class com.ebay.erl.mobius.core.datajoin.DataJoinMapper
extractSortValueKeyword, getSortValueComparator, map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSeqFileMapper

public DefaultSeqFileMapper()
Method Detail

parse

public Tuple parse(org.apache.hadoop.io.NullWritable inkey,
                   Tuple invalue)
            throws java.lang.IllegalArgumentException,
                   java.io.IOException
read the invalue and set the schema to the returned Tuple. The schema is specified in SeqFileDatasetBuilder.newInstance(com.ebay.erl.mobius.core.MobiusJob, String, String[])

Specified by:
parse in class SequenceFileMapper<org.apache.hadoop.io.NullWritable,Tuple>
Throws:
java.lang.IllegalArgumentException
java.io.IOException