org.apache.hadoop.fs
Class FileContext.FSLinkResolver<T>
java.lang.Object
org.apache.hadoop.fs.FileContext.FSLinkResolver<T>
- Enclosing class:
- FileContext
protected abstract class FileContext.FSLinkResolver<T>
- extends Object
Class used to perform an operation on and resolve symlinks in a
path. The operation may potentially span multiple file systems.
Method Summary |
abstract T |
next(AbstractFileSystem fs,
Path p)
Generic helper function overridden on instantiation to perform a
specific operation on the given file system using the given path
which may result in an UnresolvedLinkException. |
T |
resolve(FileContext fc,
Path p)
Performs the operation specified by the next function, calling it
repeatedly until all symlinks in the given path are resolved. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileContext.FSLinkResolver
protected FileContext.FSLinkResolver()
next
public abstract T next(AbstractFileSystem fs,
Path p)
throws IOException,
org.apache.hadoop.fs.UnresolvedLinkException
- Generic helper function overridden on instantiation to perform a
specific operation on the given file system using the given path
which may result in an UnresolvedLinkException.
- Parameters:
fs
- AbstractFileSystem to perform the operation on.p
- Path given the file system.
- Returns:
- Generic type determined by the specific implementation.
- Throws:
org.apache.hadoop.fs.UnresolvedLinkException
- If symbolic link path
could
not be resolved
IOException
- an I/O error occured
resolve
public T resolve(FileContext fc,
Path p)
throws IOException
- Performs the operation specified by the next function, calling it
repeatedly until all symlinks in the given path are resolved.
- Parameters:
fc
- FileContext used to access file systems.p
- The path to resolve symlinks in.
- Returns:
- Generic type determined by the implementation of next.
- Throws:
IOException
Copyright © 2009 The Apache Software Foundation