private void restoreSnapshotForPeerCluster(Configuration conf, String peerQuorumAddress)
    throws IOException {
    URI uri = ConnectionRegistryFactory.tryParseAsConnectionURI(peerQuorumAddress);
    Configuration peerConf;
    if (uri != null) {
      peerConf = applyURIConf(conf, uri);
    } else {
      peerConf = HBaseConfiguration.createClusterConf(conf, peerQuorumAddress, PEER_CONFIG_PREFIX);
    }
    FileSystem.setDefaultUri(peerConf, peerFSAddress);
    CommonFSUtils.setRootDir(peerConf, new Path(peerFSAddress, peerHBaseRootAddress));
    FileSystem fs = FileSystem.get(peerConf);
    RestoreSnapshotHelper.copySnapshotForScanner(peerConf, fs, CommonFSUtils.getRootDir(peerConf),
      new Path(peerFSAddress, peerSnapshotTmpDir), peerSnapshotName);
  }
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