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_r285207730
##########
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:
I think `Pair` will work since it implements Comparable, I'll update
----------------------------------------------------------------
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