This is an automated email from the ASF dual-hosted git repository.
amoghj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new f6a5ba0b44 Core: Use InternalData when reading manifests in
FileCleanupStrategy (#12575)
f6a5ba0b44 is described below
commit f6a5ba0b443438db9888501173d96f8dc7230e2c
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Wed Mar 19 17:04:12 2025 +0100
Core: Use InternalData when reading manifests in FileCleanupStrategy
(#12575)
---
core/src/main/java/org/apache/iceberg/FileCleanupStrategy.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/core/src/main/java/org/apache/iceberg/FileCleanupStrategy.java
b/core/src/main/java/org/apache/iceberg/FileCleanupStrategy.java
index dae99c572c..9cf12cb943 100644
--- a/core/src/main/java/org/apache/iceberg/FileCleanupStrategy.java
+++ b/core/src/main/java/org/apache/iceberg/FileCleanupStrategy.java
@@ -21,7 +21,6 @@ package org.apache.iceberg;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
-import org.apache.iceberg.avro.Avro;
import org.apache.iceberg.exceptions.NotFoundException;
import org.apache.iceberg.io.CloseableIterable;
import org.apache.iceberg.io.FileIO;
@@ -63,11 +62,11 @@ abstract class FileCleanupStrategy {
protected CloseableIterable<ManifestFile> readManifests(Snapshot snapshot) {
if (snapshot.manifestListLocation() != null) {
- return Avro.read(fileIO.newInputFile(snapshot.manifestListLocation()))
- .rename("manifest_file", GenericManifestFile.class.getName())
- .classLoader(GenericManifestFile.class.getClassLoader())
+ return InternalData.read(
+ FileFormat.AVRO,
fileIO.newInputFile(snapshot.manifestListLocation()))
+ .setRootType(GenericManifestFile.class)
.project(MANIFEST_PROJECTION)
- .reuseContainers(true)
+ .reuseContainers()
.build();
} else {
return CloseableIterable.withNoopClose(snapshot.allManifests(fileIO));