long getSizeWritten() {
    rwLock.readLock().lock();
    try {
      if (sealed.get()) {
        throw new UnsupportedOperationException("Operation supported only on index segments that are not sealed");
      }
      return sizeWritten.get();
    } finally {
      rwLock.readLock().unlock();
    }
  }
The total size in bytes written to this segment so far
@return The total size in bytes written to this segment so far
ambry-store/src/main/java/com/github/ambry/store/IndexSegment.java