@Override
    public void open(Configuration parameters) throws IOException {
        super.open(parameters);
        this.bucketNum = config.getInteger(FlinkOptions.BUCKET_INDEX_NUM_BUCKETS);
        this.indexKeyFields = config.getString(FlinkOptions.INDEX_KEY_FIELD);
        this.taskID = getRuntimeContext().getIndexOfThisSubtask();
        this.parallelism = getRuntimeContext().getNumberOfParallelSubtasks();
        this.bucketIndex = new HashMap<>();
        this.incBucketIndex = new HashSet<>();
        if (metricOption != null) {
            this.sinkMetricData = new SinkMetricData(metricOption, getRuntimeContext().getMetricGroup());
        }
    }
Constructs a BucketStreamWriteFunction.

@param config The config options
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/hudi/src/main/java/org/apache/inlong/sort/hudi/sink/bucket/BucketStreamWriteFunction.java