apache/hadoop · error · UnsupportedOperationException
Unknown type: {}
Error message
Unknown type: {} What it means
Error "Unknown type: {}" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/TreePath.java:110
}
return id;
}
public void accept(long pathId) {
this.id = pathId;
i.onAccept(this, id);
}
public INode toINode(UGIResolver ugi, BlockResolver blk,
BlockAliasMap.Writer<FileRegion> out) throws IOException {
if (stat.isFile()) {
return toFile(ugi, blk, out);
} else if (stat.isDirectory()) {
return toDirectory(ugi);
} else if (stat.isSymlink()) {
throw new UnsupportedOperationException("symlinks not supported");
} else {
throw new UnsupportedOperationException("Unknown type: " + stat);
}
}
@Override
public boolean equals(Object other) {
if (!(other instanceof TreePath)) {
return false;
}
TreePath o = (TreePath) other;
return getParentId() == o.getParentId()
&& getFileStatus().equals(o.getFileStatus());
}
@Override
public int hashCode() {
long pId = getParentId() * getFileStatus().hashCode();
return (int)(pId ^ (pId >>> 32));
}View on GitHub (pinned to 2add963021)
Solutions
- The fs2img tree walk encountered an inode type it cannot convert; remove or exclude unsupported inode types (e.g. symlinks) from the input tree.
When it happens
Trigger: fs2img TreePath encounters an entry type it does not know how to serialize (neither a file, directory, nor symlink), e.g. an unrecognized entry from the input path iteration.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/98c52ad7876dd1d7.
Report an issue: GitHub.