{"record":{"id":"0484368e52b2c95d","repo":"apache/hadoop","slug":"cannot-call-reencryptencryptionzone-on-a-symlink-t","errorCode":null,"errorMessage":"Cannot call reencryptEncryptionZone on a symlink to a non-DistributedFileSystem: {} -> {}","messagePattern":"Cannot call reencryptEncryptionZone 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":3046,"sourceCode":"  /* HDFS only */\n  public void reencryptEncryptionZone(final Path zone,\n      final ReencryptAction action) throws IOException {\n    final Path absF = fixRelativePart(zone);\n    new FileSystemLinkResolver<Void>() {\n      @Override\n      public Void doCall(final Path p) throws IOException {\n        dfs.reencryptEncryptionZone(getPathName(p), action);\n        return null;\n      }\n\n      @Override\n      public Void next(final FileSystem fs, final Path p) throws IOException {\n        if (fs instanceof DistributedFileSystem) {\n          DistributedFileSystem myDfs = (DistributedFileSystem) fs;\n          myDfs.reencryptEncryptionZone(p, action);\n          return null;\n        }\n        throw new UnsupportedOperationException(\n            \"Cannot call reencryptEncryptionZone\"\n                + \" on a symlink to a non-DistributedFileSystem: \" + zone\n                + \" -> \" + p);\n      }\n    }.resolve(this, absF);\n  }\n\n  /* HDFS only */\n  public RemoteIterator<ZoneReencryptionStatus> listReencryptionStatus()\n      throws IOException {\n    return dfs.listReencryptionStatus();\n  }\n\n  /* HDFS only */\n  public FileEncryptionInfo getFileEncryptionInfo(final Path path)\n      throws IOException {\n    Path absF = fixRelativePart(path);\n    return new FileSystemLinkResolver<FileEncryptionInfo>() {","sourceCodeStart":3028,"sourceCodeEnd":3064,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L3028-L3064","documentation":"Error \"Cannot call reencryptEncryptionZone on a symlink to a non-DistributedFileSystem: {} -> {}\" thrown in apache/hadoop.","triggerScenarios":"reencryptEncryptionZone is invoked through a symlink whose target is not a DistributedFileSystem, which does not support encryption zone re-encryption.","commonSituations":"See trigger scenarios.","solutions":["Run reencryptEncryptionZone on the real path within the DistributedFileSystem.","Resolve symlinks first; reencryption must target the actual HDFS 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"}