apache/hadoop · error · IOException

The quota system is disabled in Router.

Error message

The quota system is disabled in Router.

What it means

Quota.setQuota() refuses any setQuota operation when Router.isQuotaEnabled() is false, i.e. the config dfs.federation.router.quota.enable is unset or false (default is false). The Router-side quota system must be explicitly enabled because it requires extra state (RouterQuotaManager, quota cache) and periodic usage updates.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java:84

    this.router = router;
    this.rpcServer = server;
    this.rpcClient = server.getRPCClient();
  }

  /**
   * Set quota for the federation path.
   * @param path Federation path.
   * @param namespaceQuota Name space quota.
   * @param storagespaceQuota Storage space quota.
   * @param type StorageType that the space quota is intended to be set on.
   * @param checkMountEntry whether to check the path is a mount entry.
   * @throws IOException If the quota system is disabled or if
   * checkMountEntry is true and the path is a mount entry.
   */
  public void setQuota(String path, long namespaceQuota, long storagespaceQuota,
      StorageType type, boolean checkMountEntry) throws IOException {
    if (!router.isQuotaEnabled()) {
      throw new IOException("The quota system is disabled in Router.");
    }
    if (checkMountEntry && isMountEntry(path)) {
      throw new AccessControlException(
          "Permission denied: " + RouterRpcServer.getRemoteUser()
              + " is not allowed to change quota of " + path);
    }
    setQuotaInternal(path, null, namespaceQuota, storagespaceQuota, type);
  }

  /**
   * Set quota for the federation path.
   * @param path Federation path.
   * @param locations Locations of the Federation path.
   * @param namespaceQuota Name space quota.
   * @param storagespaceQuota Storage space quota.
   * @param type StorageType that the space quota is intended to be set on.
   * @throws IOException If the quota system is disabled.
   */

View on GitHub (pinned to 2add963021)

Solutions

  1. Set dfs.federation.router.quota.enable=true in the Router's config (e.g. router.yaml/hdfs-site.xml on every Router) and restart the Router
  2. Confirm the Router picked it up: JMX RBFMetrics or router log showing RouterQuotaManager startup
  3. If quotas are intentionally disabled, stop calling setQuota through the Router and manage quota directly on the subclusters

Example fix

<!-- before: default, quota disabled -->
<property>
  <name>dfs.federation.router.quota.enable</name>
  <value>false</value>
</property>

<!-- after -->
<property>
  <name>dfs.federation.router.quota.enable</name>
  <value>true</value>
</property>
Defensive patterns

Strategy: validation

Validate before calling

// Before calling setQuota through the Router, verify the quota system is on
boolean quotaEnabled = conf.getBoolean(
    "dfs.federation.router.quota.enable", false);
if (!quotaEnabled) {
  throw new IllegalStateException(
      "Router quota disabled: set dfs.federation.router.quota.enable=true");
}

Try / catch

try {
  routerQuota.setQuota(path, nsQuota, ssQuota, type, false);
} catch (IOException e) {
  if ("The quota system is disabled in Router.".equals(e.getMessage())) {
    // config problem: enable quota.enable or route quota calls to subclusters directly
  } else { throw e; }
}

Prevention

When it happens

Trigger: Client executes hdfs dfsadmin -setQuota/-setSpaceQuota/-setStorageTypeQuota through the Router while dfs.federation.router.quota.enable=false; admin calls RouterAdminServer.synchronizeQuota paths; setQuota invoked with checkMountEntry=false on a Router built with default config.

Common situations: New RBF deployment where operators assume quotas work like a standalone NameNode; config file where quota.enable was set on the NameNode side instead of the Router (federation.xml/router config); typo in the key so the default false applies.

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/a67fea27d1cd8c33. Report an issue: GitHub.