{"record":{"id":"7b957aaae096279c","repo":"apache/iceberg","slug":"exception-listing-files-for-at-7b957a","errorCode":null,"errorMessage":"Exception listing files for {} at {}","messagePattern":"Exception listing files for (.+?) at (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/ListFileSystemFiles.java","lineNumber":122,"sourceCode":"            \"Cannot use prefix listing with FileIO %s which does not support prefix operations.\",\n            io);\n\n        FileSystemWalker.listDirRecursivelyWithFileIO(\n            (SupportsPrefixOperations) io, location, specs, predicate, out::collect);\n      } else {\n        Predicate<FileStatus> predicate = file -> file.getModificationTime() < olderThanTimestamp;\n        FileSystemWalker.listDirRecursivelyWithHadoop(\n            location,\n            specs,\n            predicate,\n            configuration,\n            Integer.MAX_VALUE,\n            Integer.MAX_VALUE,\n            dir -> {},\n            out::collect);\n      }\n    } catch (Exception e) {\n      LOG.warn(\"Exception listing files for {} at {}\", location, ctx.timestamp(), e);\n      ctx.output(DeleteOrphanFiles.ERROR_STREAM, e);\n      errorCounter.inc();\n    }\n  }\n\n  @Override\n  public void close() throws Exception {\n    super.close();\n    tableLoader.close();\n  }\n}\n","sourceCodeStart":104,"sourceCodeEnd":134,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/ListFileSystemFiles.java#L104-L134","documentation":"Warning from the Flink maintenance ListFileSystemFiles operator when listing files in a directory for orphan-file detection throws. The exception is side-output to the DeleteOrphanFiles ERROR_STREAM and counted, so the action degrades: some files may be missed and, depending on failure mode, no orphans are reported for that location.","triggerScenarios":"processElement lists a location via FileSystem.listFiles; an unhandled Exception (FileNotFound on a just-deleted dir, permission errors, IOException from object store) hits the catch block.","commonSituations":"Conflicting URI schemes/authorities between table metadata and configured locations; directory deleted concurrently; S3 throttling; missing read permission on the warehouse path.","solutions":["Read the side-output ERROR_STREAM to inspect the wrapped exception and react","Verify the location URI (scheme/authority) matches the configured filesystem and equalSchemes()/equalAuthorities() settings","Check read permissions on the listed directory","Retry the job if the error was transient (concurrent deletion, throttling)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check the location is listable\nFileSystem fs = new Path(location).getFileSystem(conf);\nfs.exists(new Path(location));","typeGuard":null,"tryCatchPattern":"try { listFiles(location); } catch (Exception e) { LOG.warn(\"Exception listing files for {} at {}\", location, ts, e); errorCounter.inc(); }","preventionTips":["Consume the ERROR_STREAM side output to monitor listing failures","Configure equalSchemes/equalAuthorities for mixed s3/s3a environments","Grant read permission on all listed warehouse directories","Retry transient failures instead of treating one failure as fatal"],"tags":["flink","filesystem","orphan-files"],"backgroundTag":"file-list-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}