nsivabalan commented on code in PR #10578:
URL: https://github.com/apache/hudi/pull/10578#discussion_r1590697149


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/index/bloom/SparkHoodieBloomIndexHelper.java:
##########
@@ -197,14 +199,15 @@ private Map<HoodieFileGroupId, Long> 
computeComparisonsPerFileGroup(
       // we will just try exploding the input and then count to determine 
comparisons
       // FIX(vc): Only do sampling here and extrapolate?
       context.setJobStatus(this.getClass().getSimpleName(), "Compute all 
comparisons needed between records and files: " + config.getTableName());
-      fileToComparisons = fileComparisonsRDD.countByKey();
+      fileToComparisons = 
fileComparisonsRDD.countApproxDistinctByKey(0.05).collectAsMap();

Review Comment:
   I am afraid this might have any non-determinism w/ spark task retries. I do 
see that this is happening in driver and should not be re-computed on spark 
task retries. 
   can we move this to a separate PR. do some tests w/ spark task retries and 
executor failures and then put it up for review. 
   we can land this patch w/o this change. 
   



-- 
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]

Reply via email to