@Override
  public String writeToString() {
    StringBuilder buf = new StringBuilder();
    buf.append(highWatermark);
    buf.append(':');
    buf.append(minOpenTxn);
    if (exceptions.length == 0) {
      buf.append(':');  // separator for open txns
      buf.append(':');  // separator for aborted txns
    } else {
      StringBuilder open = new StringBuilder();
      StringBuilder abort = new StringBuilder();
      long abortedMin = -1;
      long abortedMax = -1;
      long openedMin = -1;
      long openedMax = -1;
      for (int i = 0; i < exceptions.length; i++) {
        if (abortedBits.get(i)) {
          if (abortedMax + 1 == exceptions[i]) {
            abortedMax++;
          } else {
            writeTxnRange(abort, abortedMin, abortedMax);
            abortedMin = abortedMax = exceptions[i];
          }
        } else {
          if (openedMax + 1 == exceptions[i]) {
            openedMax++;
          } else {
            writeTxnRange(open, openedMin, openedMax);
            openedMin = openedMax = exceptions[i];
          }
        }
      }
      writeTxnRange(abort, abortedMin, abortedMax);
      writeTxnRange(open, openedMin, openedMax);

      buf.append(':');
      buf.append(open);
      buf.append(':');
      buf.append(abort);
    }
    return buf.toString();
  }
Used if there are no open transactions in the snapshot
storage-api/src/java/org/apache/hadoop/hive/common/ValidReadTxnList.java