zhangyue19921010 commented on code in PR #13017:
URL: https://github.com/apache/hudi/pull/13017#discussion_r2011358363
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bucket/BucketStreamWriteFunction.java:
##########
@@ -95,15 +98,19 @@ public BucketStreamWriteFunction(Configuration config,
RowType rowType) {
@Override
public void open(Configuration parameters) throws IOException {
super.open(parameters);
- this.bucketNum = config.getInteger(FlinkOptions.BUCKET_INDEX_NUM_BUCKETS);
this.indexKeyFields = OptionsResolver.getIndexKeyField(config);
this.isNonBlockingConcurrencyControl =
OptionsResolver.isNonBlockingConcurrencyControl(config);
this.taskID = getRuntimeContext().getIndexOfThisSubtask();
this.parallelism = getRuntimeContext().getNumberOfParallelSubtasks();
this.bucketIndex = new HashMap<>();
this.incBucketIndex = new HashSet<>();
- this.partitionIndexFunc = BucketIndexUtil.getPartitionIndexFunc(bucketNum,
parallelism);
+ this.partitionIndexFunc =
BucketIndexUtil.getPartitionIndexFunc(parallelism);
this.isInsertOverwrite = OptionsResolver.isInsertOverwrite(config);
+ String hashingInstant =
config.get(FlinkOptions.BUCKET_INDEX_PARTITION_LOAD_INSTANT);
+ this.isPartitionLevelBucketIndexEnable =
!StringUtils.isNullOrEmpty(hashingInstant);
+ if (isPartitionLevelBucketIndexEnable) {
+ calc = PartitionBucketIndexCalculator.getInstance(hashingInstant,
metaClient);
Review Comment:
added and all changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]