@Override
    public Boolean call() throws Exception {
      LOG.debug("Verifying checksum for source: {} and target: {}", sourcePath, targetPath);
      try {
        boolean response = sourceFs.getFileChecksum(sourcePath).equals(targetFs.getFileChecksum(targetPath));
        if (!response) {
          System.err.println(
              "File Checksum mismatch in source directory " + srcDir + " and target directory " + tgtDir + " "
                  + "for source: " + sourcePath + " and target " + targetPath);
        }

        return response;
      } catch (Exception e) {
        System.out
            .println("Failed Checksum for: " + sourcePath + " and target: " + targetPath + " reason:" + e.getMessage());
        LOG.error("Failed Checksum for: {} and target: {}", sourcePath, targetPath, e);
        return false;
      }
    }
Utility class to verify checksums from source cluster & target cluster.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplicationMigrationTool.java