apache/iceberg · error · UnsupportedOperationException

Ignoring missing files is not supported

Error message

Ignoring missing files is not supported

What it means

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.

Source

Thrown at api/src/main/java/org/apache/iceberg/actions/MigrateTable.java:84

   * service.
   *
   * @param service executor service
   * @return this for method chaining
   */
  default MigrateTable executeWith(ExecutorService service) {
    throw new UnsupportedOperationException("Setting executor service is not supported");
  }

  /**
   * Enables ignoring {@link java.io.FileNotFoundException} when listing source data files. When
   * enabled, source data files that have disappeared (for example, because a partition directory
   * was removed by concurrent cleanup) are skipped with a warning instead of failing the migration.
   * The default is to fail.
   *
   * @return this for method chaining
   */
  default MigrateTable ignoreMissingFiles() {
    throw new UnsupportedOperationException("Ignoring missing files is not supported");
  }

  /** The action result that contains a summary of the execution. */
  interface Result {
    /** Returns the number of migrated data files. */
    long migratedDataFilesCount();
  }
}

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Remove ignoreMissingFiles() and ensure no concurrent cleanup deletes source files during migration
  2. Use an implementation that supports ignoring missing files (e.g. the Spark MigrateTable implementation)
  3. Retry the migration after stopping the process removing partition directories
  4. Catch UnsupportedOperationException and re-run with a consistent source table snapshot

Example fix

// before
MigrateTable.Result r = actions.migrateTable(table)
    .ignoreMissingFiles()
    .execute();
// after
MigrateTable.Result r = actions.migrateTable(table)
    .execute(); // ensure source files are not concurrently removed
Defensive patterns

Strategy: try-catch

Try / catch

try {
  builder.ignoreMissingFiles();
} catch (UnsupportedOperationException e) {
  // ensure no concurrent cleanup during migration instead
}

Prevention

When it happens

Trigger: Calling migrateTable.ignoreMissingFiles() on an implementation that has not overridden the default method, intending to skip FileNotFoundException for concurrently deleted source files.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/0b9fad45d402e15d. Report an issue: GitHub.