LogSegment getActiveSegment() {
    return activeSegment;
  }
{@inheritDoc}
<p/>
Appends the given {@code buffer} to the active log segment. The {@code buffer} will be written to a single log
segment i.e. its data will not exist across segments.
@param buffer The buffer from which data needs to be written from
@return the number of bytes written.
@throws IllegalArgumentException if the {@code buffer.remaining()} is greater than a single segment's size.
@throws IllegalStateException if there no more capacity in the log.
@throws StoreException if there was a store exception while writing.
ambry-store/src/main/java/com/github/ambry/store/Log.java