{"record":{"id":"d9a92b65b78630bf","repo":"apache/hadoop","slug":"illegal-file-pattern","errorCode":null,"errorMessage":"Illegal file pattern: {}","messagePattern":"Illegal file pattern: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobFilter.java","lineNumber":71,"sourceCode":"  /**\n   * Creates a glob filter with the specified file pattern and an user filter.\n   *\n   * @param filePattern the file pattern.\n   * @param filter user filter in addition to the glob pattern.\n   * @throws IOException thrown if the file pattern is incorrect.\n   */\n  public GlobFilter(String filePattern, PathFilter filter) throws IOException {\n    init(filePattern, filter);\n  }\n\n  void init(String filePattern, PathFilter filter) throws IOException {\n    try {\n      userFilter = filter;\n      pattern = new GlobPattern(filePattern);\n    }\n    catch (PatternSyntaxException e) {\n      // Existing code expects IOException startWith(\"Illegal file pattern\")\n      throw new IOException(\"Illegal file pattern: \"+ e.getMessage(), e);\n    }\n  }\n\n  public boolean hasPattern() {\n    return pattern.hasWildcard();\n  }\n\n  @Override\n  public boolean accept(Path path) {\n    return pattern.matches(path.getName()) && userFilter.accept(path);\n  }\n}\n","sourceCodeStart":53,"sourceCodeEnd":84,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobFilter.java#L53-L84","documentation":"Error \"Illegal file pattern: {}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobFilter.java:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the glob pattern syntax (unbalanced brackets or bad escapes).","Test the pattern against the expected PathFilter rules before submitting the job."],"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"}