public class ProxyFileSystem
extends org.apache.hadoop.fs.FilterFileSystem
Modifier and Type | Field and Description |
---|---|
protected String |
myAuthority |
protected String |
myScheme |
protected URI |
myUri |
protected String |
realAuthority |
protected String |
realScheme |
protected URI |
realUri |
Constructor and Description |
---|
ProxyFileSystem() |
ProxyFileSystem(org.apache.hadoop.fs.FileSystem fs) |
ProxyFileSystem(org.apache.hadoop.fs.FileSystem fs,
URI myUri)
Create a proxy file system for fs.
|
Modifier and Type | Method and Description |
---|---|
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 |
getFileLinkStatus(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) |
protected void |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
org.apache.hadoop.fs.Options.Rename... options) |
org.apache.hadoop.fs.Path |
resolvePath(org.apache.hadoop.fs.Path p) |
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) |
protected org.apache.hadoop.fs.FileStatus |
swizzleFileStatus(org.apache.hadoop.fs.FileStatus orig,
boolean isParam) |
protected org.apache.hadoop.fs.Path |
swizzleParamPath(org.apache.hadoop.fs.Path p) |
access, appendFile, canonicalizeUri, close, concat, create, createFile, createNonRecursive, createPathHandle, createSnapshot, createSymlink, deleteSnapshot, getAclStatus, getAllStoragePolicies, getCanonicalUri, getChildFileSystems, getConf, getDefaultBlockSize, getDefaultBlockSize, getDefaultReplication, getDefaultReplication, getFileChecksum, getInitialWorkingDirectory, getLinkTarget, getRawFileSystem, getServerDefaults, getServerDefaults, getStatus, getStoragePolicy, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, listCorruptFileBlocks, listLocatedStatus, listLocatedStatus, listStatusIterator, listXAttrs, modifyAclEntries, open, primitiveCreate, primitiveMkdir, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, renameSnapshot, resolveLink, setAcl, setStoragePolicy, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, supportsSymlinks, truncate, unsetStoragePolicy
addDelegationTokens, append, append, areSymlinksEnabled, cancelDeleteOnExit, clearStatistics, closeAll, closeAllForUGI, copyFromLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createNonRecursive, createNonRecursive, createSnapshot, delete, enableSymlinks, exists, fixRelativePart, get, get, get, getAllStatistics, getBlockSize, getCanonicalServiceName, getDefaultPort, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getLength, getLocal, getNamed, getPathHandle, getQuotaUsage, getReplication, getScheme, getStatistics, getStatistics, getStatus, getStorageStatistics, globStatus, globStatus, isDirectory, isFile, listFiles, listStatus, listStatus, listStatus, listStatusBatch, mkdirs, mkdirs, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, open, primitiveMkdir, printStatistics, processDeleteOnExit, setDefaultUri, setDefaultUri
protected String myScheme
protected String myAuthority
protected URI myUri
protected String realScheme
protected String realAuthority
protected URI realUri
public ProxyFileSystem()
public ProxyFileSystem(org.apache.hadoop.fs.FileSystem fs)
public ProxyFileSystem(org.apache.hadoop.fs.FileSystem fs, URI myUri)
fs
- FileSystem to create proxy formyUri
- URI to use as proxy. Only the scheme and authority from
this are used right nowprotected org.apache.hadoop.fs.Path swizzleParamPath(org.apache.hadoop.fs.Path p)
protected org.apache.hadoop.fs.FileStatus swizzleFileStatus(org.apache.hadoop.fs.FileStatus orig, boolean isParam)
public org.apache.hadoop.fs.Path resolvePath(org.apache.hadoop.fs.Path p) throws IOException
resolvePath
in class org.apache.hadoop.fs.FilterFileSystem
p
- IOException
public void initialize(URI name, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public URI getUri()
getUri
in class org.apache.hadoop.fs.FilterFileSystem
public String getName()
getName
in class org.apache.hadoop.fs.FileSystem
public org.apache.hadoop.fs.Path makeQualified(org.apache.hadoop.fs.Path path)
makeQualified
in class org.apache.hadoop.fs.FilterFileSystem
protected void checkPath(org.apache.hadoop.fs.Path path)
checkPath
in class org.apache.hadoop.fs.FilterFileSystem
public org.apache.hadoop.fs.BlockLocation[] getFileBlockLocations(org.apache.hadoop.fs.FileStatus file, long start, long len) throws IOException
getFileBlockLocations
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path f, int bufferSize) throws IOException
open
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f, int bufferSize, org.apache.hadoop.util.Progressable progress) throws IOException
append
in class org.apache.hadoop.fs.FilterFileSystem
IOException
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
create
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public boolean setReplication(org.apache.hadoop.fs.Path src, short replication) throws IOException
setReplication
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public boolean rename(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
rename
in class org.apache.hadoop.fs.FilterFileSystem
IOException
protected void rename(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst, org.apache.hadoop.fs.Options.Rename... options) throws IOException
rename
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public boolean delete(org.apache.hadoop.fs.Path f, boolean recursive) throws IOException
delete
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public boolean deleteOnExit(org.apache.hadoop.fs.Path f) throws IOException
deleteOnExit
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f) throws IOException
listStatus
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.Path getHomeDirectory()
getHomeDirectory
in class org.apache.hadoop.fs.FilterFileSystem
public void setWorkingDirectory(org.apache.hadoop.fs.Path newDir)
setWorkingDirectory
in class org.apache.hadoop.fs.FilterFileSystem
public org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory
in class org.apache.hadoop.fs.FilterFileSystem
public boolean mkdirs(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
mkdirs
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void copyFromLocalFile(boolean delSrc, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
copyFromLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void copyFromLocalFile(boolean delSrc, boolean overwrite, org.apache.hadoop.fs.Path[] srcs, org.apache.hadoop.fs.Path dst) throws IOException
copyFromLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void copyFromLocalFile(boolean delSrc, boolean overwrite, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
copyFromLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void copyToLocalFile(boolean delSrc, org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
copyToLocalFile
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.Path startLocalOutput(org.apache.hadoop.fs.Path fsOutputFile, org.apache.hadoop.fs.Path tmpLocalFile) throws IOException
startLocalOutput
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void completeLocalOutput(org.apache.hadoop.fs.Path fsOutputFile, org.apache.hadoop.fs.Path tmpLocalFile) throws IOException
completeLocalOutput
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path f) throws IOException
getContentSummary
in class org.apache.hadoop.fs.FileSystem
IOException
public org.apache.hadoop.fs.FileStatus getFileLinkStatus(org.apache.hadoop.fs.Path f) throws IOException
getFileLinkStatus
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f) throws IOException
getFileStatus
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public org.apache.hadoop.fs.FileChecksum getFileChecksum(org.apache.hadoop.fs.Path f) throws IOException
getFileChecksum
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void setOwner(org.apache.hadoop.fs.Path p, String username, String groupname) throws IOException
setOwner
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void setTimes(org.apache.hadoop.fs.Path p, long mtime, long atime) throws IOException
setTimes
in class org.apache.hadoop.fs.FilterFileSystem
IOException
public void setPermission(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
setPermission
in class org.apache.hadoop.fs.FilterFileSystem
IOException
Copyright © 2019 The Apache Software Foundation. All rights reserved.