{"record":{"id":"d1a2b024c90fc839","repo":"apache/hadoop","slug":"no-link-found-for-the-given-path-on-path-is","errorCode":null,"errorMessage":"No link found for the given path. on path `{}' is not within a mount point","messagePattern":"No link found for the given path\\. on path `(.+?)' is not within a mount point","errorType":"exception","errorClass":"NotInMountpointException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystemOverloadScheme.java","lineNumber":337,"sourceCode":"   * will throw NotInMountpointException. Please note, this API will not return\n   * chrooted file system. Instead, this API will get actual raw file system\n   * instances.\n   *\n   * @param path - fs uri path\n   * @param conf - configuration\n   * @throws IOException raised on errors performing I/O.\n   * @return file system.\n   */\n  public FileSystem getRawFileSystem(Path path, Configuration conf)\n      throws IOException {\n    InodeTree.ResolveResult<FileSystem> res;\n    try {\n      res = fsState.resolve(getUriPath(path), true);\n      return res.isInternalDir() ? fsGetter().get(path.toUri(), conf)\n          : ((ChRootedFileSystem) res.targetFileSystem).getMyFs();\n    } catch (FileNotFoundException e) {\n      // No link configured with passed path.\n      throw new NotInMountpointException(path,\n          \"No link found for the given path.\");\n    }\n  }\n\n  /**\n   * Gets the mount path info, which contains the target file system and\n   * remaining path to pass to the target file system.\n   *\n   * @param path the path.\n   * @param conf configuration.\n   * @return mount path info.\n   * @throws IOException raised on errors performing I/O.\n   */\n  public MountPathInfo<FileSystem> getMountPathInfo(Path path,\n      Configuration conf) throws IOException {\n    InodeTree.ResolveResult<FileSystem> res;\n    try {\n      res = fsState.resolve(getUriPath(path), true);","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystemOverloadScheme.java#L319-L355","documentation":"ViewFileSystemOverloadScheme.getRawFileSystem(Path, Configuration) resolves the path through the mount-table InodeTree to recover the raw backing FileSystem. When fsState.resolve() throws FileNotFoundException (no link at or above the path and no root fallback link configured), it is translated to NotInMountpointException with operation text \"No link found for the given path.\" — the path maps to no mount entry.","triggerScenarios":"vfsOverload.getRawFileSystem(new Path(\"/logs/app/1.log\"), conf) when no fs.viewfs.mounttable.<n>.link./logs... entry exists and no linkFallback is set; probing paths that appear in data but not in the mount table.","commonSituations":"Catalog/journal patterns (HBase-like WAL placement, Hive warehouse layout) that recover the physical cluster for a logical path via overload scheme; mount tables loaded from an external config loader (error 985 family) that returned fewer entries than expected.","solutions":["Add a mount entry covering the path: fs.viewfs.mounttable.<n>.link.<mountPoint>=<targetFSUri>","Configure fs.viewfs.mounttable.<n>.linkFallback=<targetFSUri> so unmatched paths fall through to a default cluster","Catch NotInMountpointException and route the path explicitly via its known cluster URI"],"exampleFix":"// before\nFileSystem raw = vfos.getRawFileSystem(new Path(\"/logs/app\"), conf); // throws\n\n<!-- after: mount table entry in core-site.xml -->\n<property><name>fs.viewfs.mounttable.mycluster.link./logs</name>\n  <value>hdfs://nnLogs:8020/logs</value></property>","handlingStrategy":"validation","validationCode":"static boolean hasLinkFor(ViewFileSystemOverloadScheme vfos, Path p) {\n  String s = p.toUri().getPath();\n  return vfos.getMountPoints().stream()\n      .map(mp -> mp.getMountedOnPath().toUri().getPath())\n      .anyMatch(m -> s.equals(m) || s.startsWith(m.endsWith(\"/\") ? m : m + \"/\"));\n}","typeGuard":null,"tryCatchPattern":"try {\n  FileSystem raw = vfos.getRawFileSystem(p, conf);\n} catch (NotInMountpointException e) {\n  // no link covers p and no linkFallback: route via known cluster URI instead\n}","preventionTips":["Configure linkFallback as a safety net for paths outside explicit links","Log every getRawFileSystem miss with the path and mount points to catch mount-table gaps early"],"tags":["viewfs","overload-scheme","mount-table","hadoop-common","java"],"backgroundTag":"viewfs-not-in-mountpoint","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}