{"record":{"id":"ffa80b2b4e459b75","repo":"apache/hadoop","slug":"cannot-find-password-option-key","errorCode":null,"errorMessage":"Cannot find password option {key}","messagePattern":"Cannot find password option (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSUtils.java","lineNumber":78,"sourceCode":"  /**\n   * Used to get password from configuration.\n   *\n   * @param conf configuration that contains password information\n   * @param key the key of the password\n   * @return the value for the key\n   * @throws IOException if failed to get password from configuration\n   */\n  public static String getValueWithKey(Configuration conf, String key)\n      throws IOException {\n    try {\n      final char[] pass = conf.getPassword(key);\n      if (pass != null) {\n        return (new String(pass)).trim();\n      } else {\n        return \"\";\n      }\n    } catch (IOException ioe) {\n      throw new IOException(\"Cannot find password option \" + key, ioe);\n    }\n  }\n\n  /**\n   * Calculate a proper size of multipart piece. If <code>minPartSize</code>\n   * is too small, the number of multipart pieces may exceed the limit of\n   * {@link Constants#MULTIPART_UPLOAD_PART_NUM_LIMIT}.\n   *\n   * @param contentLength the size of file.\n   * @param minPartSize the minimum size of multipart piece.\n   * @return a revisional size of multipart piece.\n   */\n  public static long calculatePartSize(long contentLength, long minPartSize) {\n    long tmpPartSize = contentLength / MULTIPART_UPLOAD_PART_NUM_LIMIT + 1;\n    return Math.max(minPartSize, tmpPartSize);\n  }\n\n  /**","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSUtils.java#L60-L96","documentation":"Error \"Cannot find password option {key}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSUtils.java:78 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Define the password/credential for the named key via a Hadoop credential provider (hadoop credential create) or set it directly in the configuration."],"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"}