@Override
  public void close() {
    if (file.exists() && getCompactionPhase().equals(Phase.DONE)) {
      String dateString = new Date(startTime).toString();
      File savedLog =
          new File(file.getAbsolutePath() + BlobStore.SEPARATOR + startTime + BlobStore.SEPARATOR + dateString);
      if (!file.renameTo(savedLog)) {
        throw new IllegalStateException("Compaction log could not be renamed after completion of compaction");
      }
    }
  }
Closes the compaction log. If compaction is complete, renames the log to keep a permanent record.
ambry-store/src/main/java/com/github/ambry/store/CompactionLog.java