private void configureBulkSize(BulkProcessor.Builder bulkProcessorBuilder) {
        final ByteSizeUnit sizeUnit;
        if (bulkProcessorFlushMaxSizeMb == -1) {
            // bulk size can be disabled with -1, however the ByteSizeValue constructor accepts -1
            // only with BYTES as the size unit
            sizeUnit = ByteSizeUnit.BYTES;
        } else {
            sizeUnit = ByteSizeUnit.MB;
        }
        bulkProcessorBuilder.setBulkSize(new ByteSizeValue(bulkProcessorFlushMaxSizeMb, sizeUnit));
    }
Build the {@link BulkProcessor}.

<p>Note: this is exposed for testing purposes.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/elasticsearch-base/src/main/java/org/apache/inlong/sort/elasticsearch/ElasticsearchSinkBase.java