org.apache.hadoop.fs
Class ProxyFileSystem
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.hadoop.fs.FilterFileSystem
org.apache.hadoop.fs.ProxyFileSystem
- All Implemented Interfaces:
- Closeable, org.apache.hadoop.conf.Configurable
public class ProxyFileSystem
- extends org.apache.hadoop.fs.FilterFileSystem
A FileSystem that can serve a given scheme/authority using some
other file system. In that sense, it serves as a proxy for the
real/underlying file system
Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem |
org.apache.hadoop.fs.FileSystem.Statistics |
Fields inherited from class org.apache.hadoop.fs.FilterFileSystem |
fs |
Fields inherited from class org.apache.hadoop.fs.FileSystem |
LOG, statistics |
Method Summary |
org.apache.hadoop.fs.FSDataOutputStream |
append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
|
protected void |
checkPath(org.apache.hadoop.fs.Path path)
|
void |
completeLocalOutput(org.apache.hadoop.fs.Path fsOutputFile,
org.apache.hadoop.fs.Path tmpLocalFile)
|
void |
copyFromLocalFile(boolean delSrc,
boolean overwrite,
org.apache.hadoop.fs.Path[] srcs,
org.apache.hadoop.fs.Path dst)
|
void |
copyFromLocalFile(boolean delSrc,
boolean overwrite,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
|
void |
copyFromLocalFile(boolean delSrc,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
|
void |
copyToLocalFile(boolean delSrc,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
|
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
|
boolean |
delete(org.apache.hadoop.fs.Path f,
boolean recursive)
|
boolean |
deleteOnExit(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.ContentSummary |
getContentSummary(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.BlockLocation[] |
getFileBlockLocations(org.apache.hadoop.fs.FileStatus file,
long start,
long len)
|
org.apache.hadoop.fs.FileChecksum |
getFileChecksum(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.Path |
getHomeDirectory()
|
String |
getName()
|
URI |
getUri()
|
org.apache.hadoop.fs.Path |
getWorkingDirectory()
|
void |
initialize(URI name,
org.apache.hadoop.conf.Configuration conf)
|
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path f)
|
org.apache.hadoop.fs.Path |
makeQualified(org.apache.hadoop.fs.Path path)
|
boolean |
mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
|
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path f,
int bufferSize)
|
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
|
void |
setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname)
|
void |
setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permission)
|
boolean |
setReplication(org.apache.hadoop.fs.Path src,
short replication)
|
void |
setTimes(org.apache.hadoop.fs.Path p,
long mtime,
long atime)
|
void |
setWorkingDirectory(org.apache.hadoop.fs.Path newDir)
|
org.apache.hadoop.fs.Path |
startLocalOutput(org.apache.hadoop.fs.Path fsOutputFile,
org.apache.hadoop.fs.Path tmpLocalFile)
|
Methods inherited from class org.apache.hadoop.fs.FilterFileSystem |
close, delete, getConf, getDefaultBlockSize, getDefaultReplication, setVerifyChecksum |
Methods inherited from class org.apache.hadoop.fs.FileSystem |
append, append, clearStatistics, closeAll, copyFromLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, createNewFile, exists, get, get, getAllStatistics, getBlockSize, getDefaultUri, getLength, getLocal, getNamed, getReplication, getStatistics, getStatistics, getUsed, globStatus, globStatus, isDirectory, isFile, listStatus, listStatus, listStatus, mkdirs, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, open, printStatistics, processDeleteOnExit, setDefaultUri, setDefaultUri |
Methods inherited from class org.apache.hadoop.conf.Configured |
setConf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myScheme
protected String myScheme
myAuthority
protected String myAuthority
myUri
protected URI myUri
realScheme
protected String realScheme
realAuthority
protected String realAuthority
realUri
protected URI realUri
ProxyFileSystem
public ProxyFileSystem()
ProxyFileSystem
public ProxyFileSystem(org.apache.hadoop.fs.FileSystem fs)
ProxyFileSystem
public ProxyFileSystem(org.apache.hadoop.fs.FileSystem fs,
URI myUri)
- Create a proxy file system for fs.
- Parameters:
fs
- FileSystem to create proxy formyUri
- URI to use as proxy. Only the scheme and authority from
this are used right now
initialize
public void initialize(URI name,
org.apache.hadoop.conf.Configuration conf)
throws IOException
- Overrides:
initialize
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
getUri
public URI getUri()
- Overrides:
getUri
in class org.apache.hadoop.fs.FilterFileSystem
getName
public String getName()
- Overrides:
getName
in class org.apache.hadoop.fs.FilterFileSystem
makeQualified
public org.apache.hadoop.fs.Path makeQualified(org.apache.hadoop.fs.Path path)
- Overrides:
makeQualified
in class org.apache.hadoop.fs.FilterFileSystem
checkPath
protected void checkPath(org.apache.hadoop.fs.Path path)
- Overrides:
checkPath
in class org.apache.hadoop.fs.FilterFileSystem
getFileBlockLocations
public org.apache.hadoop.fs.BlockLocation[] getFileBlockLocations(org.apache.hadoop.fs.FileStatus file,
long start,
long len)
throws IOException
- Overrides:
getFileBlockLocations
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
open
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path f,
int bufferSize)
throws IOException
- Overrides:
open
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
append
public org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
- Overrides:
append
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
create
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
- Overrides:
create
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
setReplication
public boolean setReplication(org.apache.hadoop.fs.Path src,
short replication)
throws IOException
- Overrides:
setReplication
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
rename
public boolean rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
- Overrides:
rename
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
delete
public boolean delete(org.apache.hadoop.fs.Path f,
boolean recursive)
throws IOException
- Overrides:
delete
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
deleteOnExit
public boolean deleteOnExit(org.apache.hadoop.fs.Path f)
throws IOException
- Overrides:
deleteOnExit
in class org.apache.hadoop.fs.FileSystem
- Throws:
IOException
listStatus
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f)
throws IOException
- Overrides:
listStatus
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
getHomeDirectory
public org.apache.hadoop.fs.Path getHomeDirectory()
- Overrides:
getHomeDirectory
in class org.apache.hadoop.fs.FilterFileSystem
setWorkingDirectory
public void setWorkingDirectory(org.apache.hadoop.fs.Path newDir)
- Overrides:
setWorkingDirectory
in class org.apache.hadoop.fs.FilterFileSystem
getWorkingDirectory
public org.apache.hadoop.fs.Path getWorkingDirectory()
- Overrides:
getWorkingDirectory
in class org.apache.hadoop.fs.FilterFileSystem
mkdirs
public boolean mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
throws IOException
- Overrides:
mkdirs
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
copyFromLocalFile
public void copyFromLocalFile(boolean delSrc,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
- Overrides:
copyFromLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
copyFromLocalFile
public void copyFromLocalFile(boolean delSrc,
boolean overwrite,
org.apache.hadoop.fs.Path[] srcs,
org.apache.hadoop.fs.Path dst)
throws IOException
- Overrides:
copyFromLocalFile
in class org.apache.hadoop.fs.FileSystem
- Throws:
IOException
copyFromLocalFile
public void copyFromLocalFile(boolean delSrc,
boolean overwrite,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
- Overrides:
copyFromLocalFile
in class org.apache.hadoop.fs.FileSystem
- Throws:
IOException
copyToLocalFile
public void copyToLocalFile(boolean delSrc,
org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
- Overrides:
copyToLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
startLocalOutput
public org.apache.hadoop.fs.Path startLocalOutput(org.apache.hadoop.fs.Path fsOutputFile,
org.apache.hadoop.fs.Path tmpLocalFile)
throws IOException
- Overrides:
startLocalOutput
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
completeLocalOutput
public void completeLocalOutput(org.apache.hadoop.fs.Path fsOutputFile,
org.apache.hadoop.fs.Path tmpLocalFile)
throws IOException
- Overrides:
completeLocalOutput
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
getContentSummary
public org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path f)
throws IOException
- Overrides:
getContentSummary
in class org.apache.hadoop.fs.FileSystem
- Throws:
IOException
getFileStatus
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f)
throws IOException
- Overrides:
getFileStatus
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
getFileChecksum
public org.apache.hadoop.fs.FileChecksum getFileChecksum(org.apache.hadoop.fs.Path f)
throws IOException
- Overrides:
getFileChecksum
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
setOwner
public void setOwner(org.apache.hadoop.fs.Path p,
String username,
String groupname)
throws IOException
- Overrides:
setOwner
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
setTimes
public void setTimes(org.apache.hadoop.fs.Path p,
long mtime,
long atime)
throws IOException
- Overrides:
setTimes
in class org.apache.hadoop.fs.FileSystem
- Throws:
IOException
setPermission
public void setPermission(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.permission.FsPermission permission)
throws IOException
- Overrides:
setPermission
in class org.apache.hadoop.fs.FilterFileSystem
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation