[HUDI-3920] Fix partition path construction in metadata table validator (#5365)
This commit is contained in:
@@ -490,7 +490,8 @@ public class HoodieMetadataTableValidator implements Serializable {
|
|||||||
|
|
||||||
// ignore partitions created by uncommitted ingestion.
|
// ignore partitions created by uncommitted ingestion.
|
||||||
allPartitionPathsFromFS = allPartitionPathsFromFS.stream().parallel().filter(part -> {
|
allPartitionPathsFromFS = allPartitionPathsFromFS.stream().parallel().filter(part -> {
|
||||||
HoodiePartitionMetadata hoodiePartitionMetadata = new HoodiePartitionMetadata(metaClient.getFs(), new Path(basePath, part));
|
HoodiePartitionMetadata hoodiePartitionMetadata =
|
||||||
|
new HoodiePartitionMetadata(metaClient.getFs(), FSUtils.getPartitionPath(basePath, part));
|
||||||
|
|
||||||
Option<String> instantOption = hoodiePartitionMetadata.readPartitionCreatedCommitTime();
|
Option<String> instantOption = hoodiePartitionMetadata.readPartitionCreatedCommitTime();
|
||||||
if (instantOption.isPresent()) {
|
if (instantOption.isPresent()) {
|
||||||
@@ -983,7 +984,7 @@ public class HoodieMetadataTableValidator implements Serializable {
|
|||||||
return baseFileNameList.stream().flatMap(filename ->
|
return baseFileNameList.stream().flatMap(filename ->
|
||||||
new ParquetUtils().readRangeFromParquetMetadata(
|
new ParquetUtils().readRangeFromParquetMetadata(
|
||||||
metaClient.getHadoopConf(),
|
metaClient.getHadoopConf(),
|
||||||
new Path(new Path(metaClient.getBasePath(), partitionPath), filename),
|
new Path(FSUtils.getPartitionPath(metaClient.getBasePath(), partitionPath), filename),
|
||||||
allColumnNameList).stream())
|
allColumnNameList).stream())
|
||||||
.sorted(new HoodieColumnRangeMetadataComparator())
|
.sorted(new HoodieColumnRangeMetadataComparator())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
@@ -1024,7 +1025,7 @@ public class HoodieMetadataTableValidator implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Option<BloomFilterData> readBloomFilterFromFile(String partitionPath, String filename) {
|
private Option<BloomFilterData> readBloomFilterFromFile(String partitionPath, String filename) {
|
||||||
Path path = new Path(new Path(metaClient.getBasePath(), partitionPath), filename);
|
Path path = new Path(FSUtils.getPartitionPath(metaClient.getBasePath(), partitionPath), filename);
|
||||||
HoodieFileReader<IndexedRecord> fileReader;
|
HoodieFileReader<IndexedRecord> fileReader;
|
||||||
try {
|
try {
|
||||||
fileReader = HoodieFileReaderFactory.getFileReader(metaClient.getHadoopConf(), path);
|
fileReader = HoodieFileReaderFactory.getFileReader(metaClient.getHadoopConf(), path);
|
||||||
|
|||||||
Reference in New Issue
Block a user