From db93ad2f4bc9b3c357f065882c3d8cbb1c0b9c07 Mon Sep 17 00:00:00 2001 From: wangxianghu Date: Wed, 19 Jan 2022 21:13:51 +0400 Subject: [PATCH] [HUDI-3277] Filter non-parquet files in bootstrap procedure (#4639) --- .../org/apache/hudi/table/action/bootstrap/BootstrapUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java index c6f083244..9b0db44ec 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java @@ -70,7 +70,7 @@ public class BootstrapUtils { Integer level = (int) relativePath.chars().filter(ch -> ch == '/').count(); HoodieFileStatus hoodieFileStatus = FileStatusUtils.fromFileStatus(topLevelStatus); result.add(Pair.of(hoodieFileStatus, Pair.of(level, relativePath))); - } else if (metaPathFilter.accept(topLevelStatus.getPath())) { + } else if (topLevelStatus.isDirectory() && metaPathFilter.accept(topLevelStatus.getPath())) { subDirectories.add(topLevelStatus.getPath().toString()); } }