apache/hadoop · error · UnsupportedOperationException
Cannot call getEZForPath on a symlink to a non-DistributedFi
Error message
Cannot call getEZForPath on a symlink to a non-DistributedFileSystem: {} -> {} What it means
Error "Cannot call getEZForPath on 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:3011
throws IOException {
statistics.incrementReadOps(1);
storageStatistics.incrementOpCounter(OpType.GET_ENCRYPTION_ZONE);
Preconditions.checkNotNull(path);
Path absF = fixRelativePart(path);
return new FileSystemLinkResolver<EncryptionZone>() {
@Override
public EncryptionZone doCall(final Path p) throws IOException {
return dfs.getEZForPath(getPathName(p));
}
@Override
public EncryptionZone next(final FileSystem fs, final Path p)
throws IOException {
if (fs instanceof DistributedFileSystem) {
DistributedFileSystem myDfs = (DistributedFileSystem) fs;
return myDfs.getEZForPath(p);
} else {
throw new UnsupportedOperationException(
"Cannot call getEZForPath"
+ " on a symlink to a non-DistributedFileSystem: " + path
+ " -> " + p);
}
}
}.resolve(this, absF);
}
/* HDFS only */
public RemoteIterator<EncryptionZone> listEncryptionZones()
throws IOException {
statistics.incrementReadOps(1);
storageStatistics.incrementOpCounter(OpType.LIST_ENCRYPTION_ZONE);
return dfs.listEncryptionZones();
}
/* HDFS only */
public void reencryptEncryptionZone(final Path zone,View on GitHub (pinned to 2add963021)
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.
When it happens
Trigger: getEZForPath is invoked through a symlink whose target is not a DistributedFileSystem, so no encryption zone information is available.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/da05d41d5a54e029.
Report an issue: GitHub.