{"record":{"id":"da05d41d5a54e029","repo":"apache/hadoop","slug":"cannot-call-getezforpath-on-a-symlink-to-a-non-dis","errorCode":null,"errorMessage":"Cannot call getEZForPath on a symlink to a non-DistributedFileSystem: {} -> {}","messagePattern":"Cannot call getEZForPath on a symlink to a non-DistributedFileSystem: (.+?) -> (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java","lineNumber":3011,"sourceCode":"      throws IOException {\n    statistics.incrementReadOps(1);\n    storageStatistics.incrementOpCounter(OpType.GET_ENCRYPTION_ZONE);\n    Preconditions.checkNotNull(path);\n    Path absF = fixRelativePart(path);\n    return new FileSystemLinkResolver<EncryptionZone>() {\n      @Override\n      public EncryptionZone doCall(final Path p) throws IOException {\n        return dfs.getEZForPath(getPathName(p));\n      }\n\n      @Override\n      public EncryptionZone next(final FileSystem fs, final Path p)\n          throws IOException {\n        if (fs instanceof DistributedFileSystem) {\n          DistributedFileSystem myDfs = (DistributedFileSystem) fs;\n          return myDfs.getEZForPath(p);\n        } else {\n          throw new UnsupportedOperationException(\n              \"Cannot call getEZForPath\"\n                  + \" on a symlink to a non-DistributedFileSystem: \" + path\n                  + \" -> \" + p);\n        }\n      }\n    }.resolve(this, absF);\n  }\n\n  /* HDFS only */\n  public RemoteIterator<EncryptionZone> listEncryptionZones()\n      throws IOException {\n    statistics.incrementReadOps(1);\n    storageStatistics.incrementOpCounter(OpType.LIST_ENCRYPTION_ZONE);\n    return dfs.listEncryptionZones();\n  }\n\n  /* HDFS only */\n  public void reencryptEncryptionZone(final Path zone,","sourceCodeStart":2993,"sourceCodeEnd":3029,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L2993-L3029","documentation":"Error \"Cannot call getEZForPath on a symlink to a non-DistributedFileSystem: {} -> {}\" thrown in apache/hadoop.","triggerScenarios":"getEZForPath is invoked through a symlink whose target is not a DistributedFileSystem, so no encryption zone information is available.","commonSituations":"See trigger scenarios.","solutions":["Call getEZForPath on the resolved HDFS path, not a symlink to another filesystem.","Verify the path belongs to a DistributedFileSystem before querying its encryption zone."],"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"}