vinothchandar commented on a change in pull request #1091: [HUDI-389] Fixing
Index look up to return right partitions for a given key along with fileId with
Global Bloom
URL: https://github.com/apache/incubator-hudi/pull/1091#discussion_r360731271
##########
File path:
hudi-client/src/main/java/org/apache/hudi/index/bloom/IntervalTreeBasedGlobalIndexFileFilter.java
##########
@@ -34,15 +36,23 @@
private final KeyRangeLookupTree indexLookUpTree = new KeyRangeLookupTree();
private final Set<String> filesWithNoRanges = new HashSet<>();
+ private final Map<String, String> fileToPartitionPathMap = new HashMap<>();
/**
* Instantiates {@link IntervalTreeBasedGlobalIndexFileFilter}.
*
* @param partitionToFileIndexInfo Map of partition to List of {@link
BloomIndexFileInfo}s
*/
IntervalTreeBasedGlobalIndexFileFilter(final Map<String,
List<BloomIndexFileInfo>> partitionToFileIndexInfo) {
- List<BloomIndexFileInfo> allIndexFiles =
-
partitionToFileIndexInfo.values().stream().flatMap(Collection::stream).collect(Collectors.toList());
+ List<BloomIndexFileInfo> allIndexFiles = new ArrayList<>();
+
+ partitionToFileIndexInfo.forEach((parition, bloomIndexFileInfoList) -> {
+ bloomIndexFileInfoList.forEach(file -> {
+ fileToPartitionPathMap.put(file.getFileId(), parition);
Review comment:
rename : `fileIdToPartitionPathMap` ?
----------------------------------------------------------------
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