{"record":{"id":"730ce26f8fa8afa8","repo":"apache/hadoop","slug":"viewfs-non-absolute-mount-name-in-config-src","errorCode":null,"errorMessage":"ViewFs: Non absolute mount name in config:{src}","messagePattern":"ViewFs: Non absolute mount name in config:(.+?)","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java","lineNumber":432,"sourceCode":"      return targetFileSystem;\n    }\n\n    T getTargetFileSystemForClose() throws IOException {\n      return targetFileSystem;\n    }\n\n  }\n\n  private void createLink(final String src, final String target,\n      final LinkType linkType, final String settings,\n      final UserGroupInformation aUgi,\n      final Configuration config)\n      throws URISyntaxException, IOException,\n      FileAlreadyExistsException, UnsupportedFileSystemException {\n    // Validate that src is valid absolute path\n    final Path srcPath = new Path(src);\n    if (!srcPath.isAbsoluteAndSchemeAuthorityNull()) {\n      throw new IOException(\"ViewFs: Non absolute mount name in config:\" + src);\n    }\n\n    final String[] srcPaths = breakIntoPathComponents(src);\n    // Make sure root is of INodeDir type before\n    // adding any regular links to it.\n    Preconditions.checkState(root.isInternalDir());\n    INodeDir<T> curInode = getRootDir();\n    int i;\n    // Ignore first initial slash, process all except last component\n    for (i = 1; i < srcPaths.length - 1; i++) {\n      final String iPath = srcPaths[i];\n      INode<T> nextInode = curInode.resolveInternal(iPath);\n      if (nextInode == null) {\n        INodeDir<T> newDir = curInode.addDir(iPath, aUgi);\n        newDir.setInternalDirFs(getTargetFileSystem(newDir));\n        nextInode = newDir;\n      }\n      if (!nextInode.isInternalDir()) {","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java#L414-L450","documentation":"InodeTree.createLink validates each mount-table source path with Path.isAbsoluteAndSchemeAuthorityNull(): it must start at '/' and carry no scheme or authority. Violations throw IOException('ViewFs: Non absolute mount name in config:<src>') while the mount table is parsed during ViewFileSystem initialization.","triggerScenarios":"A mount key missing the leading slash, e.g. fs.viewfs.mounttable.X.link.user (src='user'); or a source key containing a scheme/authority, e.g. ...link.hdfs://nn/user.","commonSituations":"Hand-written core-site.xml viewfs sections; scripts generating mount keys by concatenation; copying the target URI into the key side instead of the value side.","solutions":["Write the source as an absolute scheme-less path: fs.viewfs.mounttable.X.link./user","Keep scheme and authority only on the target (value) side","When generating keys, build prefix + '/' + relativePath and assert the source starts with '/'"],"exampleFix":"<!-- before -->\n<property><name>fs.viewfs.mounttable.cluster.link.user</name>\n  <value>hdfs://nnA/user</value></property>\n\n<!-- after -->\n<property><name>fs.viewfs.mounttable.cluster.link./user</name>\n  <value>hdfs://nnA/user</value></property>","handlingStrategy":"validation","validationCode":"static boolean isValidMountSrc(String src) {\n  return new Path(src).isAbsoluteAndSchemeAuthorityNull();\n}","typeGuard":null,"tryCatchPattern":"Catch IOException during ViewFileSystem initialization; 'ViewFs: Non absolute mount name in config:<src>' names the bad source — grep the config for that suffix and fix the key.","preventionTips":["Always start mount-table source keys with '/' after link.","Put schemes and authorities only on the target side","Generate keys as prefix + '/' + relativePath"],"tags":["hadoop","viewfs","mount-table","configuration","path-validation"],"backgroundTag":"viewfs-invalid-mount-point","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}