pseudomuto commented on a change in pull request #672: [HUDI-113]: WIP Use
Tuple2 over # delimited string
URL: https://github.com/apache/incubator-hudi/pull/672#discussion_r284393106
##########
File path:
hoodie-client/src/main/java/com/uber/hoodie/index/bloom/HoodieBloomIndex.java
##########
@@ -331,28 +330,32 @@ public boolean isImplicitWithStorage() {
final Map<String, List<BloomIndexFileInfo>> partitionToFileIndexInfo,
JavaPairRDD<String, String> partitionRecordKeyPairRDD, int
shuffleParallelism, HoodieTableMetaClient metaClient,
Map<String, Long> fileGroupToComparisons) {
- JavaPairRDD<String, Tuple2<String, HoodieKey>> fileSortedTripletRDD =
+ JavaRDD<Tuple2<String, HoodieKey>> fileComparisonsRDD =
explodeRecordRDDWithFileComparisons(partitionToFileIndexInfo,
partitionRecordKeyPairRDD);
+
if (config.useBloomIndexBucketizedChecking()) {
- BucketizedBloomCheckPartitioner partitioner = new
BucketizedBloomCheckPartitioner(shuffleParallelism,
- fileGroupToComparisons, config.getBloomIndexKeysPerBucket());
- fileSortedTripletRDD =
fileSortedTripletRDD.repartitionAndSortWithinPartitions(partitioner);
+ Partitioner partitioner = new BucketizedBloomCheckPartitioner(
+ shuffleParallelism,
+ fileGroupToComparisons,
+ config.getBloomIndexKeysPerBucket()
+ );
+
+ fileComparisonsRDD = fileComparisonsRDD
+ .mapToPair(t -> new Tuple2<>(String.format("%s#%s", t._1,
t._2.getRecordKey()), t))
Review comment:
Because the Partitioner doesn't have access to the values of the PairRDD, I
had to somehow include the record key in the key along with the file name. I
was trying to find a way to support this without making a composite key 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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services