private long verify(final WALFactory wals, final Path wal, final boolean verbose)
    throws IOException {
    WALStreamReader reader = wals.createStreamReader(wal.getFileSystem(getConf()), wal);
    long count = 0;
    Map<String, Long> sequenceIds = new HashMap<>();
    try {
      while (true) {
        WAL.Entry e = reader.next();
        if (e == null) {
          LOG.debug("Read count=" + count + " from " + wal);
          break;
        }
        count++;
        long seqid = e.getKey().getSequenceId();
        if (sequenceIds.containsKey(Bytes.toString(e.getKey().getEncodedRegionName()))) {
          // sequenceIds should be increasing for every regions
          if (sequenceIds.get(Bytes.toString(e.getKey().getEncodedRegionName())) >= seqid) {
            throw new IllegalStateException("wal = " + wal.getName() + ", " + "previous seqid = "
              + sequenceIds.get(Bytes.toString(e.getKey().getEncodedRegionName()))
              + ", current seqid = " + seqid);
          }
        }
        // update the sequence Id.
        sequenceIds.put(Bytes.toString(e.getKey().getEncodedRegionName()), seqid);
        if (verbose) LOG.info("seqid=" + seqid);
      }
    } finally {
      reader.close();
    }
    return count;
  }
Verify the content of the WAL file. Verify that the file has expected number of edits.
@param wals may not be null
@return Count of edits.
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java