{"record":{"id":"8c057c1e0cba3168","repo":"apache/hadoop","slug":"path-name-is-not-the-root-of-an-encryptio","errorCode":null,"errorMessage":"\"Path \" + name + \" is not the root of an encryption zone.\"","messagePattern":"\"Path \" \\+ name \\+ \" is not the root of an encryption zone\\.\"","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EncryptionZoneManager.java","lineNumber":780,"sourceCode":"    if (!hasCreatedEncryptionZone()\n        || !encryptionZones.containsKey(inode.getId())) {\n      return false;\n    }\n    return true;\n  }\n\n  /**\n   * Return whether an INode is an encryption zone root.\n   *\n   * @param inode the zone inode\n   * @param name the path name of the encrypted zone inode\n   * @throws IOException if the inode is not a directory,\n   *                     or is a directory but not the root of an EZ.\n   */\n  void checkEncryptionZoneRoot(final INode inode, final String name)\n      throws IOException {\n    if (!isEncryptionZoneRoot(inode, name)) {\n      throw new IOException(\"Path \" + name + \" is not the root of an\"\n          + \" encryption zone.\");\n    }\n  }\n\n  /**\n   * @return number of encryption zones.\n   */\n  public int getNumEncryptionZones() {\n    return hasCreatedEncryptionZone() ?\n        encryptionZones.size() : 0;\n  }\n\n  /**\n   * @return Whether there has been any attempt to create an encryption zone in\n   * the cluster at all. If not, it is safe to quickly return null when\n   * checking the encryption information of any file or directory in the\n   * cluster.\n   */","sourceCodeStart":762,"sourceCodeEnd":798,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EncryptionZoneManager.java#L762-L798","documentation":"Error \"\"Path \" + name + \" is not the root of an encryption zone.\"\" thrown in apache/hadoop.","triggerScenarios":"reencryptEncryptionZone on a path that is not the root of an encryption zone.","commonSituations":"See trigger scenarios.","solutions":["Pass the root directory of the encryption zone, not a nested path; list zones with 'hdfs crypto -listZones' to find zone roots."],"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"}