aokolnychyi commented on a change in pull request #930: Spark: limit the
listing depth in RemoveOrphanFilesAction
URL: https://github.com/apache/incubator-iceberg/pull/930#discussion_r409756784
##########
File path:
spark/src/main/java/org/apache/iceberg/actions/RemoveOrphanFilesAction.java
##########
@@ -272,13 +272,17 @@ private String metadataTableName(MetadataTableType type)
{
Predicate<FileStatus> predicate = file -> file.getModificationTime() <
olderThanTimestamp;
- int maxDepth = Integer.MAX_VALUE;
+ int maxDepth = 2000;
int maxDirectSubDirs = Integer.MAX_VALUE;
dirs.forEachRemaining(dir -> {
listDirRecursively(dir, predicate, conf.value().value(), maxDepth,
maxDirectSubDirs, subDirs, files);
});
+ if (!subDirs.isEmpty()) {
+ throw new RuntimeException("Could not list dirs: " + subDirs);
Review comment:
Updated. Unfortunately, we don't have `tableLocation` here as it is called
for subdirs on executors.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]