{"record":{"id":"8448d1f8a85cb856","repo":"apache/iceberg","slug":"uri-convert-to-fileuri-error-uri-is-8448d1","errorCode":null,"errorMessage":"Uri convert to FileURI error! Uri is {}.","messagePattern":"Uri convert to FileURI error! Uri is (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/FileUriKeySelector.java","lineNumber":56,"sourceCode":"\n  static final String INVALID_URI = \"__INVALID_URI__\";\n\n  private final Map<String, String> equalSchemes;\n  private final Map<String, String> equalAuthorities;\n\n  public FileUriKeySelector(\n      Map<String, String> equalSchemes, Map<String, String> equalAuthorities) {\n    this.equalSchemes = equalSchemes;\n    this.equalAuthorities = equalAuthorities;\n  }\n\n  @Override\n  public String getKey(String value) throws Exception {\n    try {\n      FileURI fileUri = new FileURI(new Path(value).toUri(), equalSchemes, equalAuthorities);\n      return fileUri.getPath();\n    } catch (Exception e) {\n      LOG.warn(\"Uri convert to FileURI error! Uri is {}.\", value, e);\n      return INVALID_URI;\n    }\n  }\n}\n","sourceCodeStart":38,"sourceCodeEnd":61,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/FileUriKeySelector.java#L38-L61","documentation":"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.","triggerScenarios":"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.","commonSituations":"Manifest entries with unencoded spaces or special characters; relative or scheme-less paths from a catalog; non-path strings routed through the selector.","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."],"exampleFix":"// before\nString uri = \"s3://bucket/a b/file.parquet\";\n// after\nString uri = \"s3://bucket/a%20b/file.parquet\";","handlingStrategy":"validation","validationCode":"boolean validUri = value != null && !value.isEmpty() && new Path(value).toUri().getScheme() != null;","typeGuard":"boolean isParsableUri(String value) {\n  try { new Path(value); return true; } catch (Exception e) { return false; }\n}","tryCatchPattern":null,"preventionTips":["Emit URL-encoded absolute URIs from all producers","Review equalSchemes/equalAuthorities settings","Route and handle INVALID_URI keys explicitly"],"tags":["flink","uri-parsing","keying","maintenance"],"backgroundTag":"invalid-url-format","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"}