{"record":{"id":"e96ec8413850becf","repo":"apache/hadoop","slug":"unknown-credential-format","errorCode":null,"errorMessage":"Unknown credential format: ","messagePattern":"Unknown credential format: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/Credentials.java","lineNumber":82,"sourceCode":"\n  public enum SerializedFormat {\n    WRITABLE((byte) 0x00),\n    PROTOBUF((byte) 0x01);\n\n    // Caching to avoid reconstructing the array each time.\n    private static final SerializedFormat[] FORMATS = values();\n\n    final byte value;\n\n    SerializedFormat(byte val) {\n      this.value = val;\n    }\n\n    public static SerializedFormat valueOf(int val) {\n      try {\n        return FORMATS[val];\n      } catch (ArrayIndexOutOfBoundsException e) {\n        throw new IllegalArgumentException(\"Unknown credential format: \" + val);\n      }\n    }\n  }\n\n  private static final Logger LOG = LoggerFactory.getLogger(Credentials.class);\n\n  private  Map<Text, byte[]> secretKeysMap = new HashMap<Text, byte[]>();\n  private  Map<Text, Token<? extends TokenIdentifier>> tokenMap =\n      new HashMap<Text, Token<? extends TokenIdentifier>>();\n\n  /**\n   * Create an empty credentials instance.\n   */\n  public Credentials() {\n  }\n\n  /**\n   * Create a copy of the given credentials.","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/Credentials.java#L64-L100","documentation":"Error \"Unknown credential format: \" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/Credentials.java:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the Credentials file with a matching Hadoop version; the stored credential format is not recognized by this reader.","Regenerate the token/credentials storage using the current Hadoop version.","Check for file corruption in the credentials storage and restore from a known-good copy."],"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"}