{"record":{"id":"b9661eb4ce16fef8","repo":"apache/hadoop","slug":"doesn-t-support-listxattrs-b9661e","errorCode":null,"errorMessage":"{} doesn't support listXAttrs","messagePattern":"(.+?) doesn't support listXAttrs","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java","lineNumber":3342,"sourceCode":"    throw new UnsupportedOperationException(getClass().getSimpleName()\n        + \" doesn't support getXAttrs\");\n  }\n\n  /**\n   * Get all of the xattr names for a file or directory.\n   * Only those xattr names which the logged-in user has permissions to view\n   * are returned.\n   * <p>\n   * Refer to the HDFS extended attributes user documentation for details.\n   *\n   * @param path Path to get extended attributes\n   * @return List{@literal <String>} of the XAttr names of the file or directory\n   * @throws IOException IO failure\n   * @throws UnsupportedOperationException if the operation is unsupported\n   *         (default outcome).\n   */\n  public List<String> listXAttrs(Path path) throws IOException {\n    throw new UnsupportedOperationException(getClass().getSimpleName()\n            + \" doesn't support listXAttrs\");\n  }\n\n  /**\n   * Remove an xattr of a file or directory.\n   * The name must be prefixed with the namespace followed by \".\". For example,\n   * \"user.attr\".\n   * <p>\n   * Refer to the HDFS extended attributes user documentation for details.\n   *\n   * @param path Path to remove extended attribute\n   * @param name xattr name\n   * @throws IOException IO failure\n   * @throws UnsupportedOperationException if the operation is unsupported\n   *         (default outcome).\n   */\n  public void removeXAttr(Path path, String name) throws IOException {\n    throw new UnsupportedOperationException(getClass().getSimpleName()","sourceCodeStart":3324,"sourceCodeEnd":3360,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java#L3324-L3360","documentation":"Error \"{} doesn't support listXAttrs\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java:3342 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a FileSystem implementation that supports XAttrs (e.g. HDFS) for listXAttrs.","Catch UnsupportedOperationException and skip XAttr listing for unsupported filesystems."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}