public static class VerifyReplication.Verifier extends TableMapper<ImmutableBytesWritable,Put>
Modifier and Type | Class and Description |
---|---|
static class |
VerifyReplication.Verifier.Counters |
Modifier and Type | Field and Description |
---|---|
private int |
batch |
private Result |
currentCompareRowInPeerTable |
private String |
delimiter |
private Connection |
replicatedConnection |
private ResultScanner |
replicatedScanner |
private Table |
replicatedTable |
private int |
sleepMsBeforeReCompare |
private Connection |
sourceConnection |
private Table |
sourceTable |
private boolean |
verbose |
Constructor and Description |
---|
Verifier() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup(org.apache.hadoop.mapreduce.Mapper.Context context) |
private void |
logFailRowAndIncreaseCounter(org.apache.hadoop.mapreduce.Mapper.Context context,
VerifyReplication.Verifier.Counters counter,
Result row) |
void |
map(ImmutableBytesWritable row,
Result value,
org.apache.hadoop.mapreduce.Mapper.Context context)
Map method that compares every scanned row with the equivalent from a distant cluster.
|
private Connection sourceConnection
private Table sourceTable
private Connection replicatedConnection
private Table replicatedTable
private ResultScanner replicatedScanner
private Result currentCompareRowInPeerTable
private int sleepMsBeforeReCompare
private boolean verbose
private int batch
public Verifier()
public void map(ImmutableBytesWritable row, Result value, org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException
map
in class org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable,Result,ImmutableBytesWritable,Put>
row
- The current table row key.value
- The columns.context
- The current context.IOException
- When something is broken with the data.private void logFailRowAndIncreaseCounter(org.apache.hadoop.mapreduce.Mapper.Context context, VerifyReplication.Verifier.Counters counter, Result row)
protected void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
cleanup
in class org.apache.hadoop.mapreduce.Mapper<ImmutableBytesWritable,Result,ImmutableBytesWritable,Put>
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.