apache/iceberg · warning
Uri convert to FileURI error! Uri is
Error message
Uri convert to FileURI error! Uri is {}. What it means
Same as error 3401 in the Flink 2.3 flavor: FileUriKeySelector.getKey() fails to convert the input string to a FileURI (Path parsing or FileURI construction throws) and, instead of failing, logs this warning and returns the INVALID_URI sentinel key. Records with bad URIs are grouped under the sentinel key.
Solutions
- Inspect the logged 'value' and fix the upstream producer to emit valid absolute file URIs.
- Verify equalSchemes/equalAuthorities configuration values.
- URL-encode special characters in stored paths.
- Filter or handle INVALID_URI-keyed records downstream if they indicate real data problems.
Example fix
// before String uri = "s3://bucket/a b/file.parquet"; // after String uri = "s3://bucket/a%20b/file.parquet";
Defensive patterns
Strategy: validation
Validate before calling
boolean validUri = value != null && !value.isEmpty() && new Path(value).toUri().getScheme() != null;
Type guard
boolean isParsableUri(String value) {
try { new Path(value); return true; } catch (Exception e) { return false; }
} Prevention
- Emit URL-encoded absolute URIs from all producers
- Review equalSchemes/equalAuthorities settings
- Route and handle INVALID_URI keys explicitly
When it happens
Trigger: getKey(value) receives a malformed URI string — illegal characters, null/empty value, or a URI the FileURI equalSchemes/equalAuthorities normalization cannot handle — causing new Path(value).toUri() or FileURI construction to throw.
Common situations: Manifest entries with unencoded spaces or special characters; relative or scheme-less paths from a catalog; non-path strings routed through the selector.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- Uri convert to FileURI error! Uri is
- Deleted only of files from table using bulk deletes
- Deleted only of files from table using bulk deletes
- Failed to check the state of the lock
- Failed to create tableMaintenance
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/8448d1f8a85cb856.
Report an issue: GitHub.
Appendix: source
Thrown at flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/FileUriKeySelector.java:56
static final String INVALID_URI = "__INVALID_URI__";
private final Map<String, String> equalSchemes;
private final Map<String, String> equalAuthorities;
public FileUriKeySelector(
Map<String, String> equalSchemes, Map<String, String> equalAuthorities) {
this.equalSchemes = equalSchemes;
this.equalAuthorities = equalAuthorities;
}
@Override
public String getKey(String value) throws Exception {
try {
FileURI fileUri = new FileURI(new Path(value).toUri(), equalSchemes, equalAuthorities);
return fileUri.getPath();
} catch (Exception e) {
LOG.warn("Uri convert to FileURI error! Uri is {}.", value, e);
return INVALID_URI;
}
}
}
View on GitHub (pinned to 86d9c8fc54)