@InterfaceAudience.Public @InterfaceStability.Stable public class TsvImporterMapper extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,Put>
Modifier and Type | Field and Description |
---|---|
protected String |
cellVisibilityExpr |
protected org.apache.hadoop.conf.Configuration |
conf |
protected CellCreator |
kvCreator |
protected ImportTsv.TsvParser |
parser |
protected long |
ts
Timestamp for all inserted rows
|
protected long |
ttl |
Constructor and Description |
---|
TsvImporterMapper() |
Modifier and Type | Method and Description |
---|---|
protected void |
doSetup(org.apache.hadoop.mapreduce.Mapper.Context context)
Handles common parameter initialization that a subclass might want to leverage.
|
org.apache.hadoop.mapreduce.Counter |
getBadLineCount() |
boolean |
getSkipBadLines() |
long |
getTs() |
void |
incrementBadLineCount(int count) |
void |
map(org.apache.hadoop.io.LongWritable offset,
org.apache.hadoop.io.Text value,
org.apache.hadoop.mapreduce.Mapper.Context context)
Convert a line of TSV text into an HBase table row.
|
protected void |
populatePut(byte[] lineBytes,
org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser.ParsedLine parsed,
Put put,
int i) |
protected void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context)
Handles initializing this class with objects specific to it (i.e., the parser).
|
protected long ts
protected ImportTsv.TsvParser parser
protected org.apache.hadoop.conf.Configuration conf
protected String cellVisibilityExpr
protected long ttl
protected CellCreator kvCreator
public long getTs()
public boolean getSkipBadLines()
public org.apache.hadoop.mapreduce.Counter getBadLineCount()
public void incrementBadLineCount(int count)
protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
doSetup
. Hence a subclass may choose to override this method
and call doSetup
as well before handling it's own custom params.setup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,Put>
context
- protected void doSetup(org.apache.hadoop.mapreduce.Mapper.Context context)
context
- public void map(org.apache.hadoop.io.LongWritable offset, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,Put>
IOException
protected void populatePut(byte[] lineBytes, org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser.ParsedLine parsed, Put put, int i) throws ImportTsv.TsvParser.BadTsvLineException, IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.