alexeykudinkin commented on code in PR #6878:
URL: https://github.com/apache/hudi/pull/6878#discussion_r1003663490
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/BaseSparkCommitActionExecutor.java:
##########
@@ -176,7 +177,10 @@ public HoodieWriteMetadata<HoodieData<WriteStatus>>
execute(HoodieData<HoodieRec
context.setJobStatus(this.getClass().getSimpleName(), "Doing partition and
writing data: " + config.getTableName());
HoodieData<WriteStatus> writeStatuses =
mapPartitionsAsRDD(inputRecordsWithClusteringUpdate, partitioner);
HoodieWriteMetadata<HoodieData<WriteStatus>> result = new
HoodieWriteMetadata<>();
- updateIndexAndCommitIfNeeded(writeStatuses, result);
+ // dereference rdd so that no double de-referencing can happen by mistake.
+ int numPartitions = Math.max(1, writeStatuses.getNumPartitions());
Review Comment:
@nsivabalan we just might need to guard against an empty RDD, but otherwise
since we're working w/ an RDD in here i think we can assume that it shouldn't
be returning an invalid value
--
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]