org.apache.hadoop.hbase.mapreduce.replication
Class VerifyReplication

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class VerifyReplication
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

This map-only job compares the data from a local table with a remote one. Every cell is compared and must have exactly the same keys (even timestamp) as well as same value. It is possible to restrict the job by time range and families. The peer id that's provided must match the one given when the replication stream was setup.

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.


Nested Class Summary
static class VerifyReplication.Verifier
          Map-only comparator for 2 tables
 
Field Summary
static String NAME
           
 
Constructor Summary
VerifyReplication()
           
 
Method Summary
static org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf, String[] args)
          Sets up the actual job.
static void main(String[] args)
          Main entry point.
 int run(String[] args)
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

VerifyReplication

public VerifyReplication()
Method Detail

createSubmittableJob

public static org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf,
                                                                   String[] args)
                                                            throws IOException
Sets up the actual job.

Parameters:
conf - The current configuration.
args - The command line parameters.
Returns:
The newly created job.
Throws:
IOException - When setting up the job fails.

run

public int run(String[] args)
        throws Exception
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Main entry point.

Parameters:
args - The command line parameters.
Throws:
Exception - When running the job fails.


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.