{"record":{"id":"68afbc7e98a80384","repo":"apache/hadoop","slug":"cannot-provisioneztrash-through-a-symlink-to-a-non","errorCode":null,"errorMessage":"Cannot provisionEZTrash through a symlink to a non-DistributedFileSystem: {} -> {}","messagePattern":"Cannot provisionEZTrash through 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":3107,"sourceCode":"  /* HDFS only */\n  public void provisionEZTrash(final Path path,\n      final FsPermission trashPermission) throws IOException {\n    Path absF = fixRelativePart(path);\n    new FileSystemLinkResolver<Void>() {\n      @Override\n      public Void doCall(Path p) throws IOException {\n        provisionEZTrash(getPathName(p), trashPermission);\n        return null;\n      }\n\n      @Override\n      public Void next(FileSystem fs, Path p) throws IOException {\n        if (fs instanceof DistributedFileSystem) {\n          DistributedFileSystem myDfs = (DistributedFileSystem)fs;\n          myDfs.provisionEZTrash(p, trashPermission);\n          return null;\n        }\n        throw new UnsupportedOperationException(\"Cannot provisionEZTrash \" +\n            \"through a symlink to a non-DistributedFileSystem: \" + fs + \" -> \"\n            + p);\n      }\n    }.resolve(this, absF);\n  }\n\n  private void provisionEZTrash(String path, FsPermission trashPermission)\n      throws IOException {\n    // make sure the path is an EZ\n    EncryptionZone ez = dfs.getEZForPath(path);\n    if (ez == null) {\n      throw new IllegalArgumentException(path + \" is not an encryption zone.\");\n    }\n\n    String ezPath = ez.getPath();\n    if (!path.toString().equals(ezPath)) {\n      throw new IllegalArgumentException(path + \" is not the root of an \" +\n          \"encryption zone. Do you mean \" + ez.getPath() + \"?\");","sourceCodeStart":3089,"sourceCodeEnd":3125,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L3089-L3125","documentation":"Error \"Cannot provisionEZTrash through a symlink to a non-DistributedFileSystem: {} -> {}\" thrown in apache/hadoop.","triggerScenarios":"provisionEZTrash is invoked through a symlink whose target is not a DistributedFileSystem, so an encryption-zone trash directory cannot be provisioned.","commonSituations":"See trigger scenarios.","solutions":["Provision EZ trash on the actual encryption zone root path in HDFS.","Do not invoke provisionEZTrash through symlinks to other filesystems."],"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-23T01:17:44.959Z"}