code: public int readMarker(SequenceFile.Reader reader) throws IOException {
      if (valueBytes == null) {
        valueBytes = reader.createValueBytes();
      }
      rawKey.reset();
      rawValue.reset();
  
      // valueBytes need not be reset since nextRaw call does it (and it is a private method)
      int status = reader.nextRaw(rawKey, valueBytes);
  
      // if we reach EOF, return -1
      if (status == -1) {
        return -1;
      }
  
      // Check if the marker key is valid and return the count
      if (isMarkerValid()) {
        valueBytes.writeUncompressedBytes(rawValue);
        rawValue.flush();
        // rawValue.getData() may return a larger byte array but Ints.fromByteArray will only read the first four bytes
        return Ints.fromByteArray(rawValue.getData());
      }
  
      // EOF not reached and marker is not valid, then thrown an IOException since we can't make progress
      throw new IOException(String.format("Invalid key for num entries appended found %s, expected : %s",
                                          new String(rawKey.getData()), TxConstants.TransactionLog.NUM_ENTRIES_APPENDED));
    }
docs: since we can recover without any consequence