static class CellCounter.CellCounterMapper extends TableMapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>
Modifier and Type | Class and Description |
---|---|
static class |
CellCounter.CellCounterMapper.Counters
Counter enumeration to count the actual rows.
|
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
(package private) byte[] |
currentFamily |
(package private) String |
currentFamilyName |
(package private) byte[] |
currentQualifier |
(package private) String |
currentQualifierName |
private String |
currentRowKey |
(package private) String |
currentRowQualifierName |
private byte[] |
lastRow |
private String |
separator |
Constructor and Description |
---|
CellCounterMapper() |
Modifier and Type | Method and Description |
---|---|
void |
map(ImmutableBytesWritable row,
Result values,
org.apache.hadoop.mapreduce.Mapper.Context context)
Maps the data.
|
protected void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context) |
private org.apache.hadoop.conf.Configuration conf
private byte[] lastRow
private String currentRowKey
byte[] currentFamily
String currentFamilyName
byte[] currentQualifier
String currentQualifierName
String currentRowQualifierName
CellCounterMapper()
protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
setup
in class org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable,Result,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>
IOException
InterruptedException
public void map(ImmutableBytesWritable row, Result values, org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException
map
in class org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable,Result,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>
row
- The current table row key.values
- The columns.context
- The current context.IOException
- When something is broken with the data.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.