apache/hadoop · error · IOException
{} doesn't exist in mount table.
Error message
{} doesn't exist in mount table. What it means
After argument validation, updateQuota queries the Router's mount table (getMountTableEntries) and looks for an entry whose sourcePath string-equals the path you passed. No exact match means the mount you tried to modify does not exist (as written), and the command fails with IOException '<path> doesn't exist in mount table.' before any quota update is sent.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java:1107
private boolean updateQuota(String mount, long nsQuota, long ssQuota)
throws IOException {
// Get existing entry
MountTableManager mountTable = client.getMountTableManager();
GetMountTableEntriesRequest getRequest = GetMountTableEntriesRequest
.newInstance(mount);
GetMountTableEntriesResponse getResponse = mountTable
.getMountTableEntries(getRequest);
List<MountTable> results = getResponse.getEntries();
MountTable existingEntry = null;
for (MountTable result : results) {
if (mount.equals(result.getSourcePath())) {
existingEntry = result;
break;
}
}
if (existingEntry == null) {
throw new IOException(mount + " doesn't exist in mount table.");
} else {
long nsCount = existingEntry.getQuota().getFileAndDirectoryCount();
long ssCount = existingEntry.getQuota().getSpaceConsumed();
// If nsQuota and ssQuota were reset, clear nsQuota and ssQuota.
if (nsQuota == HdfsConstants.QUOTA_RESET &&
ssQuota == HdfsConstants.QUOTA_RESET) {
nsCount = RouterQuotaUsage.QUOTA_USAGE_COUNT_DEFAULT;
ssCount = RouterQuotaUsage.QUOTA_USAGE_COUNT_DEFAULT;
} else {
// If nsQuota or ssQuota was unset, use the value in mount table.
if (nsQuota == HdfsConstants.QUOTA_DONT_SET) {
nsQuota = existingEntry.getQuota().getQuota();
}
if (ssQuota == HdfsConstants.QUOTA_DONT_SET) {
ssQuota = existingEntry.getQuota().getSpaceQuota();
}
}
View on GitHub (pinned to 2add963021)
Solutions
- List actual mounts and copy the exact path: hdfs dfsrouteradmin -ls / (exact string, leading slash, no trailing slash)
- Create the mount first if missing: hdfs dfsrouteradmin -add /data ns1 /data
- Confirm you are talking to the right Router (dfs.federation.router.rpc-address in the client config) and that its state store is loaded
- If the state store was just modified, allow the Router cache refresh interval to pass or restart the Router
Example fix
# before hdfs dfsrouteradmin -setQuota /data/ -nsQuota 100000 # trailing slash -> not found # after hdfs dfsrouteradmin -setQuota /data -nsQuota 100000
Defensive patterns
Strategy: validation
Validate before calling
# confirm exact mount-path match before setting a quota
MOUNTS=$(hdfs dfsrouteradmin -ls / 2>/dev/null | awk '{print $1}')
echo "$MOUNTS" | grep -qx "$MOUNT_PATH" || { echo "mount '$MOUNT_PATH' not in mount table (exact string match required)" >&2; exit 2; }
hdfs dfsrouteradmin -setQuota "$MOUNT_PATH" -nsQuota "$NS" Try / catch
Catch IOException around updateQuota calls in Java Router clients and distinguish the 'doesn't exist in mount table' message from RPC connectivity failures before retrying.
Prevention
- Copy the source path verbatim from -ls output (leading slash, no trailing slash)
- Create mounts with -add before configuring quotas in the same runbook
- Point dfsrouteradmin at the Router that owns the mount table entry
When it happens
Trigger: -setQuota /dat (typo for /data); a mount never created (missing -add step); trailing slash '/data/' vs registered '/data'; connecting to a Router whose state store has no such entry (wrong router, state store not synced, or Router freshly started and cache empty); missing leading slash.
Common situations: New RBF deployments where mounts live in a different Router's state store; CI environments rebuilt without mount entries; path-normalization mismatches between runbooks and the actual mount table.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- The operation is not allowed because there are mount points:
- Cannot find locations for {} in {}
- {} is in a read only mount point
- Cannot parse nsQuota: {}
- Cannot parse ssQuota: {}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/e83fc68cee0e15c2.
Report an issue: GitHub.