{"record":{"id":"e83fc68cee0e15c2","repo":"apache/hadoop","slug":"doesn-t-exist-in-mount-table","errorCode":null,"errorMessage":"{} doesn't exist in mount table.","messagePattern":"(.+?) doesn't exist in mount table\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java","lineNumber":1107,"sourceCode":"  private boolean updateQuota(String mount, long nsQuota, long ssQuota)\n      throws IOException {\n    // Get existing entry\n    MountTableManager mountTable = client.getMountTableManager();\n    GetMountTableEntriesRequest getRequest = GetMountTableEntriesRequest\n        .newInstance(mount);\n    GetMountTableEntriesResponse getResponse = mountTable\n        .getMountTableEntries(getRequest);\n    List<MountTable> results = getResponse.getEntries();\n    MountTable existingEntry = null;\n    for (MountTable result : results) {\n      if (mount.equals(result.getSourcePath())) {\n        existingEntry = result;\n        break;\n      }\n    }\n\n    if (existingEntry == null) {\n      throw new IOException(mount + \" doesn't exist in mount table.\");\n    } else {\n      long nsCount = existingEntry.getQuota().getFileAndDirectoryCount();\n      long ssCount = existingEntry.getQuota().getSpaceConsumed();\n      // If nsQuota and ssQuota were reset, clear nsQuota and ssQuota.\n      if (nsQuota == HdfsConstants.QUOTA_RESET &&\n          ssQuota == HdfsConstants.QUOTA_RESET) {\n        nsCount = RouterQuotaUsage.QUOTA_USAGE_COUNT_DEFAULT;\n        ssCount = RouterQuotaUsage.QUOTA_USAGE_COUNT_DEFAULT;\n      } else {\n        // If nsQuota or ssQuota was unset, use the value in mount table.\n        if (nsQuota == HdfsConstants.QUOTA_DONT_SET) {\n          nsQuota = existingEntry.getQuota().getQuota();\n        }\n        if (ssQuota == HdfsConstants.QUOTA_DONT_SET) {\n          ssQuota = existingEntry.getQuota().getSpaceQuota();\n        }\n      }\n","sourceCodeStart":1089,"sourceCodeEnd":1125,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java#L1089-L1125","documentation":"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.","triggerScenarios":"-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.","commonSituations":"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.","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"],"exampleFix":"# before\nhdfs dfsrouteradmin -setQuota /data/ -nsQuota 100000   # trailing slash -> not found\n# after\nhdfs dfsrouteradmin -setQuota /data -nsQuota 100000","handlingStrategy":"validation","validationCode":"# confirm exact mount-path match before setting a quota\nMOUNTS=$(hdfs dfsrouteradmin -ls / 2>/dev/null | awk '{print $1}')\necho \"$MOUNTS\" | grep -qx \"$MOUNT_PATH\" || { echo \"mount '$MOUNT_PATH' not in mount table (exact string match required)\" >&2; exit 2; }\nhdfs dfsrouteradmin -setQuota \"$MOUNT_PATH\" -nsQuota \"$NS\"","typeGuard":null,"tryCatchPattern":"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.","preventionTips":["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"],"tags":["hdfs","rbf","federation","quota","mount-table","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}