{"record":{"id":"e31acef702d3b7f6","repo":"apache/hadoop","slug":"data-doesn-t-have-a-suffix-from-known-suffixe","errorCode":null,"errorMessage":"Data [{}] doesn't have a suffix from known suffixes [{}]","messagePattern":"Data \\[(.+?)\\] doesn't have a suffix from known suffixes \\[(.+?)\\]","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/anonymization/WordListAnonymizerUtility.java","lineNumber":84,"sourceCode":"   * \n   * @throws RuntimeException if the data doesn't have a suffix. \n   *         Use {@link #hasSuffix(String, String[])} to make sure that the \n   *         given data has a suffix.\n   */\n  public static String[] extractSuffix(String data, String[] suffixes) {\n    // check if they end in known suffixes\n    String suffix = \"\";\n    for (String ks : suffixes) {\n      if (data.endsWith(ks)) {\n        suffix = ks;\n        // stripe off the suffix which will get appended later\n        data = data.substring(0, data.length() - suffix.length());\n        return new String[] {data, suffix};\n      }\n    }\n    \n    // throw exception\n    throw new RuntimeException(\"Data [\" + data + \"] doesn't have a suffix from\" \n        + \" known suffixes [\" + StringUtils.join(suffixes, ',') + \"]\");\n  }\n  \n  /**\n   * Checks if the given data is known. This API uses {@link #KNOWN_WORDS} to\n   * detect if the given data is a commonly used (so called 'known') word.\n   */\n  public static boolean isKnownData(String data) {\n    return isKnownData(data, KNOWN_WORDS);\n  }\n  \n  /**\n   * Checks if the given data is known.\n   */\n  public static boolean isKnownData(String data, String[] knownWords) {\n    // check if the data is known content\n    //TODO [Chunking] Do this for sub-strings of data\n    ","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/anonymization/WordListAnonymizerUtility.java#L66-L102","documentation":"Error \"Data [{}] doesn't have a suffix from known suffixes [{}]\" thrown in apache/hadoop.","triggerScenarios":"WordListAnonymizerUtility receives data whose file suffix is not in the known suffix list, so it cannot pick an anonymization strategy.","commonSituations":"See trigger scenarios.","solutions":["Add the data's suffix to the known suffix list, or provide input whose suffix is recognized."],"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"}