Package org.apache.hadoop.fs
Class FileSystemLinkResolver<T>
java.lang.Object
org.apache.hadoop.fs.FileSystemLinkResolver<T>
FileSystem-specific class used to operate on and resolve symlinks in a path.
Operation can potentially span multiple
FileSystems.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TFileSystem subclass-specific implementation of superclass method.abstract Tnext(FileSystem fs, Path p) Calls the abstract FileSystem call equivalent to the specialized subclass implementation indoCall(Path).resolve(FileSystem filesys, Path path)
-
Constructor Details
-
FileSystemLinkResolver
public FileSystemLinkResolver()
-
-
Method Details
-
doCall
FileSystem subclass-specific implementation of superclass method. Overridden on instantiation to perform the actual method call, which throws an UnresolvedLinkException if called on an unresolvedPath.- Parameters:
p- Path on which to perform an operation- Returns:
- Generic type returned by operation
- Throws:
IOException- raised on errors performing I/O.UnresolvedLinkException- unresolved link exception.
-
next
Calls the abstract FileSystem call equivalent to the specialized subclass implementation indoCall(Path). This is used when retrying the call with a newly resolved Path and corresponding new FileSystem.- Parameters:
fs- FileSystem with which to retry callp- Resolved Target of path- Returns:
- Generic type determined by implementation
- Throws:
IOException- raised on errors performing I/O.
-
resolve
Attempt calling overriddendoCall(Path)method with specifiedFileSystemandPath. If the call fails with an UnresolvedLinkException, it will try to resolve the path and retry the call by callingnext(FileSystem, Path).- Parameters:
filesys- FileSystem with which to try callpath- Path with which to try call- Returns:
- Generic type determined by implementation
- Throws:
IOException- raised on errors performing I/O.
-