apache/hadoop · error · InvalidRequestException
No directive with ID id found.
Error message
No directive with ID id found.
What it means
Error "No directive with ID id found." thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CacheManager.java:524
return new CacheDirectiveStats.Builder()
.setBytesNeeded(requestedBytes * replication)
.setFilesCached(requestedFiles)
.build();
}
/**
* Get a CacheDirective by ID, validating the ID and that the directive
* exists.
*/
private CacheDirective getById(long id) throws InvalidRequestException {
// Check for invalid IDs.
if (id <= 0) {
throw new InvalidRequestException("Invalid negative ID.");
}
// Find the directive.
CacheDirective directive = directivesById.get(id);
if (directive == null) {
throw new InvalidRequestException("No directive with ID " + id
+ " found.");
}
return directive;
}
/**
* Get a CachePool by name, validating that it exists.
*/
private CachePool getCachePool(String poolName)
throws InvalidRequestException {
CachePool pool = cachePools.get(poolName);
if (pool == null) {
throw new InvalidRequestException("Unknown pool " + poolName);
}
return pool;
}
// RPC handlersView on GitHub (pinned to 2add963021)
Solutions
- List directives with hdfs cacheadmin -listDirectives and use an existing directive ID.
When it happens
Trigger: modifyCacheDirective referencing a directive ID that does not exist.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/7b3cbff820ea9335.
Report an issue: GitHub.