@InterfaceAudience.Private public class VerifyReplication extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
Two counters are provided, Verifier.Counters.GOODROWS and BADROWS. The reason for a why a row is different is shown in the map's log.
Modifier and Type | Class and Description |
---|---|
static class |
VerifyReplication.Verifier
Map-only comparator for 2 tables
|
Modifier and Type | Field and Description |
---|---|
(package private) int |
batch |
(package private) String |
delimiter |
(package private) long |
endTime |
(package private) String |
families |
(package private) boolean |
includeDeletedCells |
private static String |
JOB_NAME_CONF_KEY |
private static org.slf4j.Logger |
LOG |
static String |
NAME |
private static String |
PEER_CONFIG_PREFIX |
(package private) String |
peerFSAddress |
(package private) String |
peerHBaseRootAddress |
(package private) String |
peerId |
(package private) String |
peerQuorumAddress |
(package private) String |
peerSnapshotName |
(package private) String |
peerSnapshotTmpDir |
(package private) String |
peerTableName |
(package private) int |
reCompareBackoffExponent |
private static ThreadPoolExecutor |
reCompareExecutor |
(package private) int |
reCompareThreads |
(package private) int |
reCompareTries |
(package private) String |
rowPrefixes |
(package private) int |
sleepMsBeforeReCompare |
(package private) String |
sourceSnapshotName |
(package private) String |
sourceSnapshotTmpDir |
(package private) long |
startTime |
(package private) String |
tableName |
(package private) boolean |
verbose |
(package private) int |
versions |
Constructor and Description |
---|
VerifyReplication() |
Modifier and Type | Method and Description |
---|---|
private static ThreadPoolExecutor |
buildReCompareExecutor(int maxThreads,
org.apache.hadoop.mapreduce.Mapper.Context context) |
private static ThreadPoolExecutor.CallerRunsPolicy |
buildRejectedReComparePolicy(org.apache.hadoop.mapreduce.Mapper.Context context) |
org.apache.hadoop.mapreduce.Job |
createSubmittableJob(org.apache.hadoop.conf.Configuration conf,
String[] args)
Sets up the actual job.
|
boolean |
doCommandLine(String[] args) |
private static Pair<ReplicationPeerConfig,org.apache.hadoop.conf.Configuration> |
getPeerQuorumConfig(org.apache.hadoop.conf.Configuration conf,
String peerId) |
protected static byte[] |
getRow(Result sourceResult,
Result replicatedResult) |
private boolean |
isPeerQuorumAddress(String cmd) |
static void |
main(String[] args)
Main entry point.
|
private static void |
printUsage(String errorMsg) |
private void |
restoreSnapshotForPeerCluster(org.apache.hadoop.conf.Configuration conf,
String peerQuorumAddress) |
int |
run(String[] args) |
private static void |
setRowPrefixFilter(Scan scan,
String rowPrefixes) |
private static void |
setStartAndStopRows(Scan scan,
byte[] startPrefixRow,
byte[] lastPrefixRow) |
private static final org.slf4j.Logger LOG
public static final String NAME
private static final String PEER_CONFIG_PREFIX
private static ThreadPoolExecutor reCompareExecutor
int reCompareTries
int reCompareBackoffExponent
int reCompareThreads
int sleepMsBeforeReCompare
long startTime
long endTime
int batch
int versions
String peerQuorumAddress
String rowPrefixes
boolean verbose
boolean includeDeletedCells
String sourceSnapshotName
String sourceSnapshotTmpDir
String peerSnapshotName
String peerSnapshotTmpDir
String peerFSAddress
String peerHBaseRootAddress
String peerTableName
private static final String JOB_NAME_CONF_KEY
public VerifyReplication()
private static Pair<ReplicationPeerConfig,org.apache.hadoop.conf.Configuration> getPeerQuorumConfig(org.apache.hadoop.conf.Configuration conf, String peerId) throws IOException
IOException
private void restoreSnapshotForPeerCluster(org.apache.hadoop.conf.Configuration conf, String peerQuorumAddress) throws IOException
IOException
public org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf, String[] args) throws IOException
conf
- The current configuration.args
- The command line parameters.IOException
- When setting up the job fails.private static void setRowPrefixFilter(Scan scan, String rowPrefixes)
private static void setStartAndStopRows(Scan scan, byte[] startPrefixRow, byte[] lastPrefixRow)
public boolean doCommandLine(String[] args)
private boolean isPeerQuorumAddress(String cmd)
private static void printUsage(String errorMsg)
private static ThreadPoolExecutor buildReCompareExecutor(int maxThreads, org.apache.hadoop.mapreduce.Mapper.Context context)
private static ThreadPoolExecutor.CallerRunsPolicy buildRejectedReComparePolicy(org.apache.hadoop.mapreduce.Mapper.Context context)
public int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.