public class ProxyFileSystem
extends FilterFileSystem
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
myAuthority |
protected java.lang.String |
myScheme |
protected java.net.URI |
myUri |
protected java.lang.String |
realAuthority |
protected java.lang.String |
realScheme |
protected java.net.URI |
realUri |
Constructor and Description |
---|
ProxyFileSystem() |
ProxyFileSystem(FileSystem fs) |
ProxyFileSystem(FileSystem fs,
java.net.URI myUri)
Create a proxy file system for fs.
|
Modifier and Type | Method and Description |
---|---|
FSDataOutputStream |
append(Path f,
int bufferSize,
Progressable progress) |
protected void |
checkPath(Path path) |
void |
completeLocalOutput(Path fsOutputFile,
Path tmpLocalFile) |
void |
copyFromLocalFile(boolean delSrc,
boolean overwrite,
Path[] srcs,
Path dst) |
void |
copyFromLocalFile(boolean delSrc,
boolean overwrite,
Path src,
Path dst) |
void |
copyFromLocalFile(boolean delSrc,
Path src,
Path dst) |
void |
copyToLocalFile(boolean delSrc,
Path src,
Path dst) |
FSDataOutputStream |
create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
boolean |
delete(Path f,
boolean recursive) |
boolean |
deleteOnExit(Path f) |
ContentSummary |
getContentSummary(Path f) |
BlockLocation[] |
getFileBlockLocations(FileStatus file,
long start,
long len) |
FileChecksum |
getFileChecksum(Path f) |
FileStatus |
getFileStatus(Path f) |
Path |
getHomeDirectory() |
java.lang.String |
getName() |
java.net.URI |
getUri() |
Path |
getWorkingDirectory() |
void |
initialize(java.net.URI name,
Configuration conf) |
FileStatus[] |
listStatus(Path f) |
Path |
makeQualified(Path path) |
boolean |
mkdirs(Path f,
FsPermission permission) |
FSDataInputStream |
open(Path f,
int bufferSize) |
boolean |
rename(Path src,
Path dst) |
Path |
resolvePath(Path p) |
void |
setOwner(Path p,
java.lang.String username,
java.lang.String groupname) |
void |
setPermission(Path p,
FsPermission permission) |
boolean |
setReplication(Path src,
short replication) |
void |
setTimes(Path p,
long mtime,
long atime) |
void |
setWorkingDirectory(Path newDir) |
Path |
startLocalOutput(Path fsOutputFile,
Path tmpLocalFile) |
protected java.lang.String myScheme
protected java.lang.String myAuthority
protected java.net.URI myUri
protected java.lang.String realScheme
protected java.lang.String realAuthority
protected java.net.URI realUri
public ProxyFileSystem()
public ProxyFileSystem(FileSystem fs)
public ProxyFileSystem(FileSystem fs, java.net.URI myUri)
fs
- FileSystem to create proxy formyUri
- URI to use as proxy. Only the scheme and authority from
this are used right nowpublic Path resolvePath(Path p) throws java.io.IOException
p
- java.io.IOException
public void initialize(java.net.URI name, Configuration conf) throws java.io.IOException
java.io.IOException
public java.net.URI getUri()
public java.lang.String getName()
public Path makeQualified(Path path)
protected void checkPath(Path path)
public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws java.io.IOException
java.io.IOException
public FSDataInputStream open(Path f, int bufferSize) throws java.io.IOException
java.io.IOException
public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws java.io.IOException
java.io.IOException
public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws java.io.IOException
java.io.IOException
public boolean setReplication(Path src, short replication) throws java.io.IOException
java.io.IOException
public boolean rename(Path src, Path dst) throws java.io.IOException
java.io.IOException
public boolean delete(Path f, boolean recursive) throws java.io.IOException
java.io.IOException
public boolean deleteOnExit(Path f) throws java.io.IOException
java.io.IOException
public FileStatus[] listStatus(Path f) throws java.io.IOException
java.io.IOException
public Path getHomeDirectory()
public void setWorkingDirectory(Path newDir)
public Path getWorkingDirectory()
public boolean mkdirs(Path f, FsPermission permission) throws java.io.IOException
java.io.IOException
public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws java.io.IOException
java.io.IOException
public void copyFromLocalFile(boolean delSrc, boolean overwrite, Path[] srcs, Path dst) throws java.io.IOException
java.io.IOException
public void copyFromLocalFile(boolean delSrc, boolean overwrite, Path src, Path dst) throws java.io.IOException
java.io.IOException
public void copyToLocalFile(boolean delSrc, Path src, Path dst) throws java.io.IOException
java.io.IOException
public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws java.io.IOException
java.io.IOException
public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws java.io.IOException
java.io.IOException
public ContentSummary getContentSummary(Path f) throws java.io.IOException
java.io.IOException
public FileStatus getFileStatus(Path f) throws java.io.IOException
java.io.IOException
public FileChecksum getFileChecksum(Path f) throws java.io.IOException
java.io.IOException
public void setOwner(Path p, java.lang.String username, java.lang.String groupname) throws java.io.IOException
java.io.IOException
public void setTimes(Path p, long mtime, long atime) throws java.io.IOException
java.io.IOException
public void setPermission(Path p, FsPermission permission) throws java.io.IOException
java.io.IOException
Copyright © 2012 The Apache Software Foundation