@Override
    public void close(boolean complete) {
        if (closed) return;
        closed = true;
        if (!complete) {
            records.clear();
        }
    }
Writes a metadata image to a list of records.
metadata/src/main/java/org/apache/kafka/image/writer/RecordListWriter.java