vinothchandar 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_r285170806
##########
File path:
hoodie-client/src/main/java/com/uber/hoodie/index/bloom/HoodieGlobalBloomIndex.java
##########
@@ -87,17 +89,14 @@ public HoodieGlobalBloomIndex(HoodieWriteConfig config) {
IndexFileFilter indexFileFilter = config.getBloomIndexPruneByRanges()
? new IntervalTreeBasedGlobalIndexFileFilter(partitionToFileIndexInfo)
: new ListBasedGlobalIndexFileFilter(partitionToFileIndexInfo);
+
return partitionRecordKeyPairRDD.map(partitionRecordKeyPair -> {
String recordKey = partitionRecordKeyPair._2();
String partitionPath = partitionRecordKeyPair._1();
- List<Tuple2<String, Tuple2<String, HoodieKey>>> recordComparisons = new
ArrayList<>();
- indexFileFilter.getMatchingFiles(partitionPath,
recordKey).forEach(matchingFile -> {
- recordComparisons.add(
- new Tuple2<>(String.format("%s#%s", matchingFile, recordKey),
- new Tuple2<>(matchingFile,
- new HoodieKey(recordKey,
indexToPartitionMap.get(matchingFile)))));
- });
- return recordComparisons;
- }).flatMapToPair(List::iterator);
+
Review comment:
nice clean up
----------------------------------------------------------------
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