[HUDI-2144]Bug-Fix:Offline clustering(HoodieClusteringJob) will cause insert action losing data (#3240)
* fixed * add testUpsertPartitionerWithSmallFileHandlingAndClusteringPlan ut * fix CheckStyle Co-authored-by: yuezhang <yuezhang@freewheel.tv>
This commit is contained in:
@@ -146,7 +146,7 @@ public class UpsertPartitioner<T extends HoodieRecordPayload<T>> extends Partiti
|
||||
* @return smallFiles not in clustering
|
||||
*/
|
||||
private List<SmallFile> filterSmallFilesInClustering(final Set<String> pendingClusteringFileGroupsId, final List<SmallFile> smallFiles) {
|
||||
if (this.config.isClusteringEnabled()) {
|
||||
if (!pendingClusteringFileGroupsId.isEmpty()) {
|
||||
return smallFiles.stream()
|
||||
.filter(smallFile -> !pendingClusteringFileGroupsId.contains(smallFile.location.getFileId())).collect(Collectors.toList());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user