apache/hadoop · error · IOException

Key ${name} not found

Error message

Key ${name} not found

What it means

Error "Key ${name} not found" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/UserProvider.java:120

  @Override
  public synchronized void deleteKey(String name) throws IOException {
    Metadata meta = getMetadata(name);
    if (meta == null) {
      throw new IOException("Key " + name + " does not exist in " + this);
    }
    for(int v=0; v < meta.getVersions(); ++v) {
      credentials.removeSecretKey(new Text(buildVersionName(name, v)));
    }
    credentials.removeSecretKey(new Text(name));
    cache.remove(name);
  }

  @Override
  public synchronized KeyVersion rollNewVersion(String name,
                                    byte[] material) throws IOException {
    Metadata meta = getMetadata(name);
    if (meta == null) {
      throw new IOException("Key " + name + " not found");
    }
    if (meta.getBitLength() != 8 * material.length) {
      throw new IOException("Wrong key length. Required " +
          meta.getBitLength() + ", but got " + (8 * material.length));
    }
    int nextVersion = meta.addVersion();
    credentials.addSecretKey(new Text(name), meta.serialize());
    String versionName = buildVersionName(name, nextVersion);
    credentials.addSecretKey(new Text(versionName), material);
    return new KeyVersion(name, versionName, material);
  }

  @Override
  public String toString() {
    return SCHEME_NAME + ":///";
  }

  @Override

View on GitHub (pinned to 2add963021)

Solutions

  1. Create the named key before deleting or reading it.

Example fix

hadoop key create keyname before the operation.

When it happens

Trigger: Raised at runtime when the documented precondition or configuration requirement for this operation is violated.

Common situations: Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/a306612787e816d4. Report an issue: GitHub.