@InterfaceAudience.Public public class TextSortReducer extends org.apache.hadoop.mapreduce.Reducer<ImmutableBytesWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,KeyValue>
HFileOutputFormat2
,
CellSortReducer
,
PutSortReducer
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.mapreduce.Counter |
badLineCount |
private String |
cellVisibilityExpr
Cell visibility expr
|
private CellCreator |
kvCreator |
private ImportTsv.TsvParser |
parser |
private String |
separator
Column seperator
|
private boolean |
skipBadLines
Should skip bad lines
|
private long |
ts
Timestamp for all inserted rows
|
private long |
ttl
Cell TTL
|
Constructor and Description |
---|
TextSortReducer() |
Modifier and Type | Method and Description |
---|---|
protected void |
doSetup(org.apache.hadoop.mapreduce.Reducer.Context context,
org.apache.hadoop.conf.Configuration conf)
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) |
protected void |
reduce(ImmutableBytesWritable rowKey,
Iterable<org.apache.hadoop.io.Text> lines,
org.apache.hadoop.mapreduce.Reducer.Context context) |
protected void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context)
Handles initializing this class with objects specific to it (i.e., the parser).
|
private long ts
private boolean skipBadLines
private org.apache.hadoop.mapreduce.Counter badLineCount
private ImportTsv.TsvParser parser
private String cellVisibilityExpr
private long ttl
private CellCreator kvCreator
public TextSortReducer()
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.Reducer.Context context)
doSetup
. Hence a
subclass may choose to override this method and call doSetup
as well before
handling it's own custom params. nsetup
in class org.apache.hadoop.mapreduce.Reducer<ImmutableBytesWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,KeyValue>
protected void doSetup(org.apache.hadoop.mapreduce.Reducer.Context context, org.apache.hadoop.conf.Configuration conf)
protected void reduce(ImmutableBytesWritable rowKey, Iterable<org.apache.hadoop.io.Text> lines, org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
reduce
in class org.apache.hadoop.mapreduce.Reducer<ImmutableBytesWritable,org.apache.hadoop.io.Text,ImmutableBytesWritable,KeyValue>
IOException
InterruptedException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.