{"record":{"id":"b0987e2686753ed9","repo":"apache/hadoop","slug":"cannot-satisfystoragepolicy-through-a-symlink-to-a","errorCode":null,"errorMessage":"Cannot satisfyStoragePolicy through a symlink to a non-DistributedFileSystem: {} -> {}","messagePattern":"Cannot satisfyStoragePolicy 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":3447,"sourceCode":"    storageStatistics.incrementOpCounter(OpType.SATISFY_STORAGE_POLICY);\n    Path absF = fixRelativePart(path);\n    new FileSystemLinkResolver<Void>() {\n\n      @Override\n      public Void doCall(Path p) throws IOException {\n        dfs.satisfyStoragePolicy(getPathName(p));\n        return null;\n      }\n\n      @Override\n      public Void next(FileSystem fs, Path p) throws IOException {\n        // DFS only\n        if (fs instanceof  DistributedFileSystem) {\n          DistributedFileSystem myDfs = (DistributedFileSystem) fs;\n          myDfs.satisfyStoragePolicy(p);\n          return null;\n        }\n        throw new UnsupportedOperationException(\n            \"Cannot satisfyStoragePolicy through a symlink to a \"\n                + \"non-DistributedFileSystem: \" + path + \" -> \" + p);\n      }\n    }.resolve(this, absF);\n  }\n\n  /**\n   * Get erasure coding policy information for the specified path.\n   *\n   * @param path The path of the file or directory\n   * @return Returns the policy information if file or directory on the path\n   * is erasure coded, null otherwise. Null will be returned if directory or\n   * file has REPLICATION policy.\n   * @throws IOException\n   */\n  public ErasureCodingPolicy getErasureCodingPolicy(final Path path)\n      throws IOException {\n    statistics.incrementReadOps(1);","sourceCodeStart":3429,"sourceCodeEnd":3465,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L3429-L3465","documentation":"Error \"Cannot satisfyStoragePolicy through a symlink to a non-DistributedFileSystem: {} -> {}\" thrown in apache/hadoop.","triggerScenarios":"satisfyStoragePolicy is invoked through a symlink whose target is not a DistributedFileSystem, which does not support storage policies.","commonSituations":"See trigger scenarios.","solutions":["Run satisfyStoragePolicy on the real path in the DistributedFileSystem.","Avoid symlinks to other filesystems for storage policy operations."],"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"}