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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Constructor Details
-
TsvImporterCustomTestMapper
public TsvImporterCustomTestMapper()
-
-
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 classorg.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, throws IOExceptionorg.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.- Overrides:
map
in classorg.apache.hadoop.hbase.mapreduce.TsvImporterMapper
- Throws:
IOException
-