{"record":{"id":"0b9fad45d402e15d","repo":"apache/iceberg","slug":"ignoring-missing-files-is-not-supported","errorCode":null,"errorMessage":"Ignoring missing files is not supported","messagePattern":"Ignoring missing files is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/MigrateTable.java","lineNumber":84,"sourceCode":"   * service.\n   *\n   * @param service executor service\n   * @return this for method chaining\n   */\n  default MigrateTable executeWith(ExecutorService service) {\n    throw new UnsupportedOperationException(\"Setting executor service is not supported\");\n  }\n\n  /**\n   * Enables ignoring {@link java.io.FileNotFoundException} when listing source data files. When\n   * enabled, source data files that have disappeared (for example, because a partition directory\n   * was removed by concurrent cleanup) are skipped with a warning instead of failing the migration.\n   * The default is to fail.\n   *\n   * @return this for method chaining\n   */\n  default MigrateTable ignoreMissingFiles() {\n    throw new UnsupportedOperationException(\"Ignoring missing files is not supported\");\n  }\n\n  /** The action result that contains a summary of the execution. */\n  interface Result {\n    /** Returns the number of migrated data files. */\n    long migratedDataFilesCount();\n  }\n}\n","sourceCodeStart":66,"sourceCodeEnd":93,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/MigrateTable.java#L66-L93","documentation":"MigrateTable.ignoreMissingFiles() is a default interface method that throws UnsupportedOperationException. It is meant to be overridden by implementations that can tolerate vanished source data files during listing; calling the stub means the chosen implementation has no support for skipping missing files.","triggerScenarios":"Calling migrateTable.ignoreMissingFiles() on an implementation that has not overridden the default method, intending to skip FileNotFoundException for concurrently deleted source files.","commonSituations":"Users migrating a Hive table while concurrent cleanup removes partition directories enable the tolerance option, but their engine binding (not Spark's) lacks the override and throws instead.","solutions":["Remove ignoreMissingFiles() and ensure no concurrent cleanup deletes source files during migration","Use an implementation that supports ignoring missing files (e.g. the Spark MigrateTable implementation)","Retry the migration after stopping the process removing partition directories","Catch UnsupportedOperationException and re-run with a consistent source table snapshot"],"exampleFix":"// before\nMigrateTable.Result r = actions.migrateTable(table)\n    .ignoreMissingFiles()\n    .execute();\n// after\nMigrateTable.Result r = actions.migrateTable(table)\n    .execute(); // ensure source files are not concurrently removed","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  builder.ignoreMissingFiles();\n} catch (UnsupportedOperationException e) {\n  // ensure no concurrent cleanup during migration instead\n}","preventionTips":["Avoid concurrent partition-directory cleanup while a migration is running","Verify feature support per implementation before enabling tolerance options","Plan migrations during quiesced windows so missing-file tolerance is unnecessary","Catch UnsupportedOperationException at the configuration stage, not mid-migration"],"tags":["unsupported-operation","java","file-not-found","fluent-api"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}