apache/hadoop · error · FileNotFoundException

"INode does not exist for " + name

Error message

"INode does not exist for " + name

What it means

Lookup guard in isEncryptionZoneRoot: the path resolves to no INode while an encryption-zone-root check is being made, so the named zone cannot be verified and FileNotFoundException names the missing path.

Solutions

  1. Verify the path exists in HDFS before operating on the encryption zone; correct the path name.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: getEZForPath/re-encryption lookup for a path whose inode no longer exists.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EncryptionZoneManager.java:757

        break;
      }
    }
    final boolean hasMore = (numResp < tailMap.size());
    return new BatchedListEntries<>(ret, hasMore);
  }

  /**
   * Return whether an INode is an encryption zone root.
   * @param inode of the encryption zone inode
   * @param name the path name of the encrypted zone inode
   * @return true when INode is an encryption zone root else false
   * @throws FileNotFoundException
   */
  boolean isEncryptionZoneRoot(final INode inode, final String name)
      throws FileNotFoundException {
    assert dir.hasReadLock();
    if (inode == null) {
      throw new FileNotFoundException("INode does not exist for " + name);
    }
    if (!inode.isDirectory()) {
      return false;
    }
    if (!hasCreatedEncryptionZone()
        || !encryptionZones.containsKey(inode.getId())) {
      return false;
    }
    return true;
  }

  /**
   * Return whether an INode is an encryption zone root.
   *
   * @param inode the zone inode
   * @param name the path name of the encrypted zone inode
   * @throws IOException if the inode is not a directory,
   *                     or is a directory but not the root of an EZ.

View on GitHub (pinned to 2add963021)