apache/hadoop · error · UnsupportedOperationException
{} doesn't support satisfyStoragePolicy
Error message
{} doesn't support satisfyStoragePolicy What it means
satisfyStoragePolicy asks a filesystem to physically move blocks to match their assigned storage policy (HDFS Mover functionality). AbstractFileSystem.satisfyStoragePolicy(Path) is a default stub that throws UnsupportedOperationException with the subclass name. Only HDFS implements it, so the error means the path is not on HDFS.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java:1521
* {@link FileContext#deleteSnapshot(Path, String)}.
*
* @param snapshotDir snapshot dir.
* @param snapshotName snapshot name.
* @throws IOException raised on errors performing I/O.
*/
public void deleteSnapshot(final Path snapshotDir, final String snapshotName)
throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support deleteSnapshot");
}
/**
* Set the source path to satisfy storage policy.
* @param path The source path referring to either a directory or a file.
* @throws IOException raised on errors performing I/O.
*/
public void satisfyStoragePolicy(final Path path) throws IOException {
throw new UnsupportedOperationException(
getClass().getSimpleName() + " doesn't support satisfyStoragePolicy");
}
/**
* Set the storage policy for a given file or directory.
*
* @param path file or directory path.
* @param policyName the name of the target storage policy. The list
* of supported Storage policies can be retrieved
* via {@link #getAllStoragePolicies}.
* @throws IOException raised on errors performing I/O.
*/
public void setStoragePolicy(final Path path, final String policyName)
throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support setStoragePolicy");
}
View on GitHub (pinned to 2add963021)
Solutions
- Verify the path is hdfs:// and use HdfsAdmin.satisfyStoragePolicy (or `hdfs dfsadmin -fs hdfs://... satisfyStoragePolicy <path>`) for the supported path.
- Guard the call by URI scheme when the same code runs over mixed filesystems.
- Catch UnsupportedOperationException and skip policy satisfaction where it cannot apply.
- On HDFS, confirm a policy is actually set (setStoragePolicy) before requesting satisfaction.
Example fix
// before
fc.satisfyStoragePolicy(path); // throws on file://
// after
if ("hdfs".equals(path.toUri().getScheme())) {
fc.satisfyStoragePolicy(path);
} Defensive patterns
Strategy: validation
Validate before calling
static boolean policyOpsSupported(Path p) {
return "hdfs".equals(p.toUri().getScheme());
} Try / catch
try {
fc.satisfyStoragePolicy(path);
} catch (UnsupportedOperationException e) {
LOG.debug("policy satisfaction n/a on {}", path);
} Prevention
- Drive HDFS Mover-style operations through HdfsAdmin, not generic FileContext code
- Verify scheme before mixing tiering calls into portable pipelines
When it happens
Trigger: FileContext.satisfyStoragePolicy(path) (or HDFS policy-satisfaction tooling driven through the generic API) on local, viewfs-to-object-store, or ftp paths; tiering scripts that call satisfy right after setStoragePolicy but pointed at a non-HDFS mount.
Common situations: Cold-data tiering automation reused across clusters; dev/test runs where fs.defaultFS=file://; a mount-table entry for an s3a target receiving HDFS storage-policy commands.
Related errors
- {} doesn't support setStoragePolicy
- {} doesn't support unsetStoragePolicy
- {} doesn't support getStoragePolicy
- {} doesn't support getAllStoragePolicies
- {} does not support listCorruptFileBlocks
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/2b7e0357ec59512c.
Report an issue: GitHub.