private boolean hasData() {
        return this.buckets.size() > 0
                && this.buckets.values().stream().anyMatch(bucket -> bucket.records.size() > 0);
    }
Buffers the given record.

<p>Flush the data bucket first if the bucket records size is greater than
the configured value {@link FlinkOptions#WRITE_BATCH_SIZE}.

<p>Flush the max size data bucket if the total buffer size exceeds the configured
threshold {@link FlinkOptions#WRITE_TASK_MAX_SIZE}.

@param value HoodieRecord
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/hudi/src/main/java/org/apache/inlong/sort/hudi/sink/StreamWriteFunction.java