Class TsvImporterTextMapper

java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>
org.apache.hadoop.hbase.mapreduce.TsvImporterTextMapper

@Public public class TsvImporterTextMapper extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>
Write table content out to map output files.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper

    org.apache.hadoop.mapreduce.Mapper.Context
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.apache.hadoop.mapreduce.Counter
     
    private static final org.slf4j.Logger
     
    private boolean
     
     
    private String
    Column seperator
    private boolean
    Should skip bad lines
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doSetup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>.org.apache.hadoop.mapreduce.Mapper.Context context)
    Handles common parameter initialization that a subclass might want to leverage.
    org.apache.hadoop.mapreduce.Counter
     
    boolean
     
    void
     
    void
    map(org.apache.hadoop.io.LongWritable offset, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>.org.apache.hadoop.mapreduce.Mapper.Context context)
    Convert a line of TSV text into an HBase table row.
    protected void
    setup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>.org.apache.hadoop.mapreduce.Mapper.Context context)
    Handles initializing this class with objects specific to it (i.e., the parser).

    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
  • Field Details

  • Constructor Details

  • Method Details

    • getSkipBadLines

      public boolean getSkipBadLines()
    • getBadLineCount

      public org.apache.hadoop.mapreduce.Counter getBadLineCount()
    • incrementBadLineCount

      public void incrementBadLineCount(int count)
    • setup

      protected void setup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>.org.apache.hadoop.mapreduce.Mapper.Context context)
      Handles initializing this class with objects specific to it (i.e., the parser). Common initialization that might be leveraged by a subclass is done in doSetup. Hence a subclass may choose to override this method and call doSetup as well before handling it's own custom params.
      Overrides:
      setup in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>
    • doSetup

      protected void doSetup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>.org.apache.hadoop.mapreduce.Mapper.Context context)
      Handles common parameter initialization that a subclass might want to leverage.
    • map

      public void map(org.apache.hadoop.io.LongWritable offset, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>.org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException
      Convert a line of TSV text into an HBase table row.
      Overrides:
      map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,org.apache.hadoop.io.Text>
      Throws:
      IOException