You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2025/06/19 00:42:54 UTC
Re: [PR] [HUDI-9535] Prevent Unnecessary data transfer b/w driver and executor in Spark Partitioner [hudi]
danny0405 commented on code in PR #13459:
URL: https://github.com/apache/hudi/pull/13459#discussion_r2155782778
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/BaseSparkCommitActionExecutor.java:
##########
@@ -280,11 +282,14 @@ protected HoodieData<WriteStatus> mapPartitionsAsRDD(HoodieData<HoodieRecord<T>>
// Partition only
partitionedRDD = mappedRDD.partitionBy(partitioner);
}
+
+ Broadcast<SparkBucketInfoGetter> bucketInfoGetter = ((HoodieSparkEngineContext) this.context)
+ .getJavaSparkContext().broadcast(((SparkHoodiePartitioner) partitioner).getSparkBucketInfoGetter());
return HoodieJavaRDD.of(partitionedRDD.map(Tuple2::_2).mapPartitionsWithIndex((partition, recordItr) -> {
if (WriteOperationType.isChangingRecords(operationType)) {
- return handleUpsertPartition(instantTime, partition, recordItr, partitioner);
+ return handleUpsertPartition(instantTime, partition, recordItr, bucketInfoGetter);
Review Comment:
Hmm, guess the core change is here.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org