Class TsvImporterCustomTestMapper

java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Put>
org.apache.hadoop.hbase.mapreduce.TsvImporterMapper
org.apache.hadoop.hbase.mapreduce.TsvImporterCustomTestMapper

public class TsvImporterCustomTestMapper extends org.apache.hadoop.hbase.mapreduce.TsvImporterMapper
Dummy mapper used for unit tests to verify that the mapper can be injected. This approach would be used if a custom transformation needed to be done after reading the input data before writing it to HFiles.
  • 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 org.apache.hadoop.hbase.mapreduce.TsvImporterMapper

    cellVisibilityExpr, conf, kvCreator, parser, ts, ttl
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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,org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Put>.org.apache.hadoop.mapreduce.Mapper.Context context)
    Convert a line of TSV text into an HBase table row after transforming the values by multiplying them by 3.
    protected void
    setup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Put>.org.apache.hadoop.mapreduce.Mapper.Context context)
     

    Methods inherited from class org.apache.hadoop.hbase.mapreduce.TsvImporterMapper

    doSetup, getBadLineCount, getSkipBadLines, getTs, incrementBadLineCount, populatePut

    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 Details

  • Method Details

    • setup

      protected void setup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Put>.org.apache.hadoop.mapreduce.Mapper.Context context)
      Overrides:
      setup in class org.apache.hadoop.hbase.mapreduce.TsvImporterMapper
    • 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,org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Put>.org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException
      Convert a line of TSV text into an HBase table row after transforming the values by multiplying them by 3.
      Overrides:
      map in class org.apache.hadoop.hbase.mapreduce.TsvImporterMapper
      Throws:
      IOException