void write(long brokerEpoch, int version) throws Exception {
        FileOutputStream os = new FileOutputStream(cleanShutdownFile);
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8));
        try {
            Content content = new Content(version, brokerEpoch);
            bw.write(Json.encodeAsString(content));
            bw.flush();
            os.getFD().sync();
        } finally {
            bw.close();
            os.close();
        }
    }
Clean shutdown file that indicates the broker was cleanly shutdown in 0.8 and higher.
This is used to avoid unnecessary recovery after a clean shutdown. In theory this could be
avoided by passing in the recovery point, however finding the correct position to do this
requires accessing the offset index which may not be safe in an unclean shutdown.
For more information see the discussion in PR#2104

Also, the clean shutdown file can also store the broker epoch, this can be used in the broker registration to
demonstrate the last reboot is a clean shutdown. (KIP-966)
storage/src/main/java/org/apache/kafka/storage/internals/checkpoint/CleanShutdownFileHandler.java