apache/hadoop · error · IOException

ViewFs: Cannot initialize: Empty Mount table in config for

Error message

ViewFs: Cannot initialize: Empty Mount table in config for {scheme}://{mountTableName}/

What it means

Thrown by InodeTree when no mount table entries were found in the configuration and initingUriAsFallbackOnNoMounts is false. The viewfs mount table for scheme://mountTableName/ is empty, so ViewFs cannot be initialized.

Solutions

  1. Define at least one mount point (link, linkMergeSlash, or linkFallback) for the mount table in the configuration.
  2. Check fs.viewfs.mounttable.<mountTableName>.link* properties.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown during ViewFs initialization when the configuration for the given scheme/mount table name contains no mount entries.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java:758

          }
          fallbackLink = new INodeLink<T>(mountTableName, ugi,
              initAndGetTargetFs(), le.getTarget());
          continue;
        case REGEX:
          addRegexMountEntry(le);
          continue;
        default:
          createLink(le.getSrc(), le.getTarget(), le.getLinkType(),
              le.getSettings(), le.getUgi(), le.getConfig());
        }
      }
      rootFallbackLink = fallbackLink;
      getRootDir().addFallbackLink(rootFallbackLink);
    }

    if (!gotMountTableEntry) {
      if (!initingUriAsFallbackOnNoMounts) {
        throw new IOException(new StringBuilder(
            "ViewFs: Cannot initialize: Empty Mount table in config for ")
            .append(theUri.getScheme()).append("://").append(mountTableName)
            .append("/").toString());
      }
      FileSystem.LOG
          .info("Empty mount table detected for {} and considering itself "
              + "as a linkFallback.", theUri);
      rootFallbackLink = new INodeLink<T>(mountTableName, ugi,
          initAndGetTargetFs(), theUri.toString());
      getRootDir().addFallbackLink(rootFallbackLink);
    }
  }

  /**
   * Get collection of linkEntry. Sort mount point based on alphabetical order of the src paths.
   * The purpose is to group nested paths(shortest path always comes first) during INodeTree creation.
   * E.g. /foo is nested with /foo/bar so an INodeDirLink will be created at /foo.
   * @param linkEntries input linkEntries

View on GitHub (pinned to 2add963021)