apache/iceberg · error · UnsupportedOperationException

Ignoring missing files is not supported

Error message

Ignoring missing files is not supported

What it means

SnapshotTable.ignoreMissingFiles() is a default interface method on the API module that throws UnsupportedOperationException. It signals that the action implementation (a catalog-specific or custom SnapshotTable) does not support skipping data files that disappeared between planning and execution; the default is to fail the snapshot when files are missing. Only implementations that explicitly override this method support lenient behavior.

Solutions

  1. Remove the ignoreMissingFiles() call so the action uses the default fail-on-missing-files behavior
  2. Upgrade to a catalog/action implementation that overrides ignoreMissingFiles()
  3. Implement ignoreMissingFiles() in the custom SnapshotTable action to set the skip-missing-files flag
  4. Ensure concurrent cleanup (expireSnapshots/orphan file removal) is not racing the snapshot import

Example fix

// before
SnapshotTable action = actions.snapshotTable(sourceTable, destIdent).ignoreMissingFiles();
// after
// Only call ignoreMissingFiles if the implementation supports it:
SnapshotTable action = actions.snapshotTable(sourceTable, destIdent);
if (action.supportsIgnoreMissingFiles()) { // or use an upgraded impl
  action = action.ignoreMissingFiles();
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (action.getClass().equals(SnapshotTable.class) /* default impl */) {
  throw new IllegalStateException("This SnapshotTable does not support ignoreMissingFiles");
}

Try / catch

try {
  action.ignoreMissingFiles();
} catch (UnsupportedOperationException e) {
  // proceed without lenient missing-file handling or switch implementation
  LOG.warn("ignoreMissingFiles unsupported: {}", e.getMessage());
}

Prevention

When it happens

Trigger: Calling snapshotTable().ignoreMissingFiles() on an implementation that has not overridden the default method, e.g. a custom action or a catalog whose SnapshotTable action does not support the option.

Common situations: Using a catalog connector (e.g. JDBC, Hive, Nessie builds) whose staged snapshot action predates or omits the ignoreMissingFiles capability; running snapshot import while files were deleted by concurrent cleanup and expecting a warning instead of a hard failure.

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/4361c433bb9b2013. Report an issue: GitHub.

Appendix: source

Thrown at api/src/main/java/org/apache/iceberg/actions/SnapshotTable.java:81

   * service.
   *
   * @param service executor service
   * @return this for method chaining
   */
  default SnapshotTable 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 snapshot.
   * The default is to fail.
   *
   * @return this for method chaining
   */
  default SnapshotTable 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 imported data files. */
    long importedDataFilesCount();
  }
}

View on GitHub (pinned to 86d9c8fc54)