private boolean valid() {
        return (s3Options.getBatchSize() > 0 && size >= s3Options.getBatchSize())
                || batchBytes >= s3Options.getMaxBatchBytes();
    }
S3 dirty sink that is used to sink dirty data to s3

@param <T>
inlong-sort/sort-flink/base/src/main/java/org/apache/inlong/sort/base/dirty/sink/s3/S3DirtySink.java