{"record":{"id":"1d06654a1a552d5e","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-e-1d0665","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement equalAuthorities\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement equalAuthorities\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java","lineNumber":137,"sourceCode":"   * @param newEqualSchemes list of equal schemes\n   * @return this for method chaining\n   */\n  default DeleteOrphanFiles equalSchemes(Map<String, String> newEqualSchemes) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement equalSchemes\");\n  }\n\n  /**\n   * Passes authorities that should be considered equal.\n   *\n   * <p>The key may include a comma-separate list of authorities. For instance, Map(\"s1name,s2name\",\n   * \"servicename\").\n   *\n   * @param newEqualAuthorities list of equal authorities\n   * @return this for method chaining\n   */\n  default DeleteOrphanFiles equalAuthorities(Map<String, String> newEqualAuthorities) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement equalAuthorities\");\n  }\n\n  /** The action result that contains a summary of the execution. */\n  interface Result {\n    /** Returns locations of orphan files. */\n    Iterable<String> orphanFileLocations();\n\n    /** Returns the total number of orphan files. */\n    default long orphanFilesCount() {\n      return 0;\n    }\n  }\n\n  /**\n   * Defines the action behavior when location prefixes (scheme/authority) mismatch.\n   *\n   * <p>{@link #ERROR} - throw an exception. {@link #IGNORE} - no action. {@link #DELETE} - delete","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/DeleteOrphanFiles.java#L119-L155","documentation":"equalAuthorities(Map<String,String>) on DeleteOrphanFiles declares which URI authorities (e.g., different Kerberos servicenames or host aliases) should be considered equal when comparing file locations. The default throws UnsupportedOperationException when the action implementation does not support this configuration option.","triggerScenarios":"Calling .equalAuthorities(map) on a DeleteOrphanFiles implementation lacking the override — e.g., an older engine runtime or a custom implementation of the action.","commonSituations":"Storage migrations where the same filesystem is reachable under different authorities; running new configuration code against an older Iceberg dependency.","solutions":["Upgrade the engine integration to a version implementing equalAuthorities.","Remove the equalAuthorities call if authorities already compare equal in your environment.","Override equalAuthorities in a custom DeleteOrphanFiles implementation."],"exampleFix":"// before\nDeleteOrphanFiles a = action.equalAuthorities(Map.of(\"old-host\", \"new-host\")); // throws\n// after (after upgrading to a supporting implementation)\nDeleteOrphanFiles a = action.equalAuthorities(Map.of(\"old-host\", \"new-host\"));","handlingStrategy":"try-catch","validationCode":"boolean ok = Arrays.stream(action.getClass().getMethods()).anyMatch(m -> \"equalAuthorities\".equals(m.getName()) && m.getDeclaringClass() != DeleteOrphanFiles.class);","typeGuard":"boolean implemented = action.getClass() != DeleteOrphanFiles.class;","tryCatchPattern":"try { action = action.equalAuthorities(authorityMap); } catch (UnsupportedOperationException e) { LOG.warn(\"equalAuthorities unsupported; using default comparison\"); }","preventionTips":["Use consistent authorities across locations to avoid needing equalAuthorities","Upgrade engine integration before configuring authority equality"],"tags":["java","iceberg","unsupported-operation","uri-normalization"],"backgroundTag":"method-not-implemented","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"}