T - is AbstractFileSystem or FileSystem
The two main methods are
InodeTree(Configuration, String, URI, boolean) // constructor
resolve(String, boolean)@Private
@Unstable
public abstract class InodeTree<T>
extends java.lang.Object
getTargetFileSystem(INodeDir), etc.
The mountable is initialized from the config variables as
specified in ViewFs| Modifier and Type | Class | Description |
|---|---|---|
static class |
InodeTree.INodeLink<T> |
An internal class to represent a mount link.
|
static class |
InodeTree.MountPoint<T> |
|
static class |
InodeTree.ResolveResult<T> |
Resolve returns ResolveResult.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
InodeTree(Configuration config,
java.lang.String viewName,
java.net.URI theUri,
boolean initingUriAsFallbackOnNoMounts) |
Create Inode Tree from the specified mount-table specified in Config.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected InodeTree.ResolveResult<T> |
buildResolveResultForRegexMountPoint(org.apache.hadoop.fs.viewfs.InodeTree.ResultKind resultKind,
java.lang.String resolvedPathStr,
java.lang.String targetOfResolvedPathStr,
Path remainingPath) |
Build resolve result.
|
java.lang.String |
getHomeDirPrefixValue() |
|
java.util.List<InodeTree.MountPoint<T>> |
getMountPoints() |
|
InodeTree.INodeLink<T> |
getRootFallbackLink() |
|
protected abstract T |
getTargetFileSystem(java.lang.String settings,
java.net.URI[] mergeFsURIs) |
|
protected abstract T |
getTargetFileSystem(org.apache.hadoop.fs.viewfs.InodeTree.INodeDir<T> dir) |
|
protected abstract java.util.function.Function<java.net.URI,T> |
initAndGetTargetFs() |
The user of this class must subclass and implement the following
3 abstract methods.
|
boolean |
isRootInternalDir() |
|
InodeTree.ResolveResult<T> |
resolve(java.lang.String p,
boolean resolveLastComponent) |
Resolve the pathname p relative to root InodeDir.
|
protected InodeTree.ResolveResult<T> |
tryResolveInRegexMountpoint(java.lang.String srcPath,
boolean resolveLastComponent) |
Walk through all regex mount points to see
whether the path match any regex expressions.
|
protected InodeTree(Configuration config, java.lang.String viewName, java.net.URI theUri, boolean initingUriAsFallbackOnNoMounts) throws UnsupportedFileSystemException, java.net.URISyntaxException, FileAlreadyExistsException, java.io.IOException
config - the mount table keys are prefixed with
FsConstants.CONFIG_VIEWFS_PREFIX.viewName - the name of the mount table
if null use defaultMT name.theUri - heUri.initingUriAsFallbackOnNoMounts - initingUriAsFallbackOnNoMounts.UnsupportedFileSystemException - file system for uri is
not found.java.net.URISyntaxException - if the URI does not have an authority
it is badly formed.FileAlreadyExistsException - there is a file at the path specified
or is discovered on one of its ancestors.java.io.IOException - raised on errors performing I/O.protected abstract java.util.function.Function<java.net.URI,T> initAndGetTargetFs()
protected abstract T getTargetFileSystem(org.apache.hadoop.fs.viewfs.InodeTree.INodeDir<T> dir) throws java.net.URISyntaxException, java.io.IOException
java.net.URISyntaxExceptionjava.io.IOExceptionprotected abstract T getTargetFileSystem(java.lang.String settings, java.net.URI[] mergeFsURIs) throws UnsupportedFileSystemException, java.net.URISyntaxException, java.io.IOException
UnsupportedFileSystemExceptionjava.net.URISyntaxExceptionjava.io.IOExceptionpublic boolean isRootInternalDir()
public InodeTree.INodeLink<T> getRootFallbackLink()
public InodeTree.ResolveResult<T> resolve(java.lang.String p, boolean resolveLastComponent) throws java.io.IOException
p - - input pathresolveLastComponent - resolveLastComponent.java.io.IOException - raised on errors performing I/O.protected InodeTree.ResolveResult<T> tryResolveInRegexMountpoint(java.lang.String srcPath, boolean resolveLastComponent)
srcPath - srcPath.resolveLastComponent - resolveLastComponent.protected InodeTree.ResolveResult<T> buildResolveResultForRegexMountPoint(org.apache.hadoop.fs.viewfs.InodeTree.ResultKind resultKind, java.lang.String resolvedPathStr, java.lang.String targetOfResolvedPathStr, Path remainingPath)
resultKind - resultKind.resolvedPathStr - resolvedPathStr.targetOfResolvedPathStr - targetOfResolvedPathStr.remainingPath - remainingPath.public java.util.List<InodeTree.MountPoint<T>> getMountPoints()
public java.lang.String getHomeDirPrefixValue()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.