satishkotha commented on a change in pull request #2275:
URL: https://github.com/apache/hudi/pull/2275#discussion_r548336012
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/UpsertPartitioner.java
##########
@@ -140,11 +154,15 @@ private void assignInserts(WorkloadProfile profile,
HoodieEngineContext context)
Map<String, List<SmallFile>> partitionSmallFilesMap =
getSmallFilesForPartitions(new ArrayList<String>(partitionPaths),
context);
+ Map<String, Set<String>> partitionPathToPendingClusteringFileGroupsId =
getPartitionPathToPendingClusteringFileGroupsId();
+
for (String partitionPath : partitionPaths) {
WorkloadStat pStat = profile.getWorkloadStat(partitionPath);
if (pStat.getNumInserts() > 0) {
+ // exclude the small file in pending clustering, because in pending
clustering file not support update now.
+ Set<String> inPendingClusteringFileId =
partitionPathToPendingClusteringFileGroupsId.getOrDefault(partitionPath,
Collections.emptySet());
+ List<SmallFile> smallFiles =
UpdateStrategy.filterSmallFiles(inPendingClusteringFileId,
partitionSmallFilesMap.get(partitionPath));
Review comment:
why is this a static method? If clustering is not enabled on a table,
this filtering is expensive. Should we add 'default' strategy for that case?
The default strategy would not do any filtering.
If clustering is enabled, we would use RejectUpdateStrategy and that does
filtering.
----------------------------------------------------------------
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]