private static Pair<ReplicationPeerConfig, Configuration>
    getPeerQuorumConfig(final Configuration conf, String peerId) throws IOException {
    ZKWatcher localZKW = null;
    try {
      localZKW = new ZKWatcher(conf, "VerifyReplication", new Abortable() {
        @Override
        public void abort(String why, Throwable e) {
        }

        @Override
        public boolean isAborted() {
          return false;
        }
      });
      ReplicationPeerStorage storage =
        ReplicationStorageFactory.getReplicationPeerStorage(FileSystem.get(conf), localZKW, conf);
      ReplicationPeerConfig peerConfig = storage.getPeerConfig(peerId);
      return Pair.newPair(peerConfig,
        ReplicationPeerConfigUtil.getPeerClusterConfiguration(conf, peerConfig));
    } catch (ReplicationException e) {
      throw new IOException("An error occurred while trying to connect to the remote peer cluster",
        e);
    } finally {
      if (localZKW != null) {
        localZKW.close();
      }
    }
  }
Map method that compares every scanned row with the equivalent from a distant cluster.
@param row     The current table row key.
@param value   The columns.
@param context The current context.
@throws IOException When something is broken with the data.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java