jonvex commented on code in PR #8782:
URL: https://github.com/apache/hudi/pull/8782#discussion_r1204240162
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/HoodieTableFileSystemView.java:
##########
@@ -199,7 +201,7 @@ protected boolean
isPendingCompactionScheduledForFileId(HoodieFileGroupId fgId)
protected void resetPendingCompactionOperations(Stream<Pair<String,
CompactionOperation>> operations) {
// Build fileId to Pending Compaction Instants
this.fgIdToPendingCompaction =
createFileIdToPendingCompactionMap(operations.map(entry ->
- Pair.of(entry.getValue().getFileGroupId(), Pair.of(entry.getKey(),
entry.getValue()))).collect(Collectors.toMap(Pair::getKey, Pair::getValue)));
+ Pair.of(entry.getValue().getFileGroupId(), Pair.of(entry.getKey(),
entry.getValue()))).collect(Collectors.toConcurrentMap(Pair::getKey,
Pair::getValue)));
}
Review Comment:
I have only seen the issue present when using the timeline server. I added a
log statement when it is adding the bootstrap base files to the map and the
output below shows that the partitions don't seem to be processed sequentially.
```
23/05/22 14:03:58 INFO AbstractTableFileSystemView: Bootstrap Index
available for partition partition_path=2015-03-16
23/05/22 14:03:58 INFO AbstractTableFileSystemView: Bootstrap Index
available for partition partition_path=2016-03-15
23/05/22 14:03:58 INFO HFileBootstrapIndex: Loaded HFileBasedBootstrapIndex
with source base path :/Users/jon/Documents/timelineFail/base
23/05/22 14:03:58 INFO AbstractTableFileSystemView: Bootstrap Index
available for partition partition_path=2015-03-17
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-17/part-00003-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7673}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2016-03-15/part-00003-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7802}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-17/part-00002-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7828}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2016-03-15/part-00002-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7686}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-17/part-00001-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7677}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-16/part-00003-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7687}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-17/part-00000-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7690}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2016-03-15/part-00000-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7817}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-16/part-00002-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7679}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2016-03-15/part-00001-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7684}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-16/part-00000-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7667}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding bootstrap mappping
for
BaseFile{fullPath=file:/Users/jon/Documents/timelineFail/base/partition_path=2015-03-16/part-00001-8b016653-133e-475c-9820-375c57081c8b.c000.snappy.parquet,
fileLen=7825}
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding file-groups for
partition :partition_path=2015-03-17, #FileGroups=4
23/05/22 14:03:58 DEBUG AbstractTableFileSystemView: addFilesToView:
NumFiles=4, NumFileGroups=4, FileGroupsCreationTime=0, StoreTimeTaken=30
23/05/22 14:03:58 DEBUG AbstractTableFileSystemView: Time to load partition
(partition_path=2015-03-17) =161
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding file-groups for
partition :partition_path=2016-03-15, #FileGroups=4
23/05/22 14:03:58 DEBUG HoodieTableFileSystemView: Adding file-groups for
partition :partition_path=2015-03-16, #FileGroups=4
23/05/22 14:03:58 DEBUG AbstractTableFileSystemView: addFilesToView:
NumFiles=4, NumFileGroups=4, FileGroupsCreationTime=0,
```
--
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]