seaweedfs/seaweedfs · error · UnsupportedOperationException
{getSimpleName} doesn't support createSnapshot
Error message
{getSimpleName} doesn't support createSnapshot What it means
UnsupportedOperationException('<class> doesn't support createSnapshot') thrown unconditionally by SeaweedFileSystem.createSnapshot() (seaweed.hdfs.SeaweedFileSystem:393). The HDFS snapshot API (point-in-time, read-only copy of a directory subtree) is not implemented by this client, so creating a snapshot on a seaweedfs:// path always fails deterministically.
Source
Thrown at other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java:393
}
public boolean supportsSymlinks() {
return false;
}
/**
* Create a snapshot.
*
* @param path The directory where snapshots will be taken.
* @param snapshotName The name of the snapshot
* @return the snapshot path.
* @throws IOException IO failure
* @throws UnsupportedOperationException if the operation is unsupported
*/
@Override
public Path createSnapshot(Path path, String snapshotName)
throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support createSnapshot");
}
/**
* Rename a snapshot.
*
* @param path The directory path where the snapshot was taken
* @param snapshotOldName Old name of the snapshot
* @param snapshotNewName New name of the snapshot
* @throws IOException IO failure
* @throws UnsupportedOperationException if the operation is unsupported
* (default outcome).
*/
@Override
public void renameSnapshot(Path path, String snapshotOldName,
String snapshotNewName) throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support renameSnapshot");View on GitHub (pinned to 1c926e8fac)
Solutions
- Use SeaweedFS-native protection instead: filer-level replication to another cluster, volume snapshots, or S3-style versioning depending on deployment.
- Implement an application-level 'snapshot' by recursively copying the subtree to a backup path before mutating it.
- Remove/disable snapshot steps in runbooks when the target is seaweedfs://.
Example fix
// before fs.createSnapshot(dirPath, "pre-migration"); // UnsupportedOperationException // after — explicit copy snapshot Path snap = new Path(dirPath.getParent(), dirPath.getName() + ".snap-" + System.currentTimeMillis()); org.apache.hadoop.fs.FileUtil.copy(fs, dirPath, fs, snap, false, true, fs.getConf());
Defensive patterns
Strategy: try-catch
Validate before calling
boolean supportsSnapshots(FileSystem fs) {
return !(fs instanceof seaweed.hdfs.SeaweedFileSystem)
&& !"seaweedfs".equals(fs.getUri().getScheme());
} Type guard
boolean canSnapshot = !(fs instanceof seaweed.hdfs.SeaweedFileSystem);
Try / catch
try {
fs.createSnapshot(dir, name);
} catch (UnsupportedOperationException e) {
// fall back to a copy-based snapshot
org.apache.hadoop.fs.FileUtil.copy(fs, dir, fs, snapPath, false, true, fs.getConf());
} Prevention
- Treat snapshots as an HDFS-specific capability; probe scheme/instance before calling on compatible filesystems.
- For SeaweedFS, plan DR at the filer/volume replication layer, not the Hadoop snapshot API.
- Catch UnsupportedOperationException explicitly in admin tooling so one bad target doesn't abort the whole runbook.
When it happens
Trigger: Calling fs.createSnapshot(path, snapshotName) on a SeaweedFileSystem; scripts using 'hdfs dfsapi'-style snapshot commands; backup/DR tooling that snapshots directories before destructive operations.
Common situations: Disaster-recovery automation written against HDFS being repointed at SeaweedFS; admin runbooks that snapshot before big migrations; version-driven re-exposure when ops tooling adds snapshot safety checks.
Related errors
- SeaweedFileSystem doesn't support renameSnapshot
- SeaweedFileSystem doesn't support deleteSnapshot
- Not implemented by the {getSimpleName} FileSystem implementa
- Filesystem does not support symlinks!
- SeaweedFileSystem doesn't support modifyAclEntries
AI-assisted analysis of seaweedfs/seaweedfs@1c926e8fac (2026-08-15).
Data as JSON: /api/errors/466a92ef8c7b26c7.
Report an issue: GitHub.