protected long getNextSequenceId(final WAL wal) throws IOException {
    WriteEntry we = mvcc.begin();
    mvcc.completeAndWait(we);
    return we.getWriteNumber();
  }
Method to safely get the next sequence number.
@return Next sequence number unassociated with any actual edit.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java