apache/hadoop · error · UnsupportedOperationException
Cannot unsetErasureCodingPolicy through a symlink to a non-D
Error message
Cannot unsetErasureCodingPolicy through a symlink to a non-DistributedFileSystem: {} -> {} What it means
Error "Cannot unsetErasureCodingPolicy through a symlink to a non-DistributedFileSystem: {} -> {}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java:3598
public void unsetErasureCodingPolicy(final Path path) throws IOException {
statistics.incrementWriteOps(1);
storageStatistics.incrementOpCounter(OpType.UNSET_EC_POLICY);
Path absF = fixRelativePart(path);
new FileSystemLinkResolver<Void>() {
@Override
public Void doCall(final Path p) throws IOException {
dfs.unsetErasureCodingPolicy(getPathName(p));
return null;
}
@Override
public Void next(final FileSystem fs, final Path p) throws IOException {
if (fs instanceof DistributedFileSystem) {
DistributedFileSystem myDfs = (DistributedFileSystem) fs;
myDfs.unsetErasureCodingPolicy(p);
return null;
}
throw new UnsupportedOperationException(
"Cannot unsetErasureCodingPolicy through a symlink to a "
+ "non-DistributedFileSystem: " + path + " -> " + p);
}
}.resolve(this, absF);
}
/**
* Verifies if the given policies are supported in the given cluster setup.
* If not policy is specified checks for all enabled policies.
* @param policyNames name of policies.
* @return the result if the given policies are supported in the cluster setup
* @throws IOException
*/
public ECTopologyVerifierResult getECTopologyResultForPolicies(
final String... policyNames) throws IOException {
return dfs.getECTopologyResultForPolicies(policyNames);
}
View on GitHub (pinned to 2add963021)
Solutions
- Unset the erasure coding policy on the actual HDFS path.
- Resolve symlinks; the operation requires a DistributedFileSystem target.
When it happens
Trigger: unsetErasureCodingPolicy is invoked through a symlink whose target is not a DistributedFileSystem, which does not support erasure coding policies.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/819a3ddd80e97a4e.
Report an issue: GitHub.