public class Ks3FileSystem
extends org.apache.hadoop.fs.FileSystem
About folder structure: using object key a/b.txt to represent a file within folder There will not having fake object to represent folder if the folder is not empty; but if a folder is empty, then will have a empty object to represent the folder, i.e. "a/c/"
| 限定符和类型 | 字段和说明 |
|---|---|
long |
ks3BlockSize |
boolean |
ks3CheckSub |
URI |
uri |
org.apache.hadoop.fs.Path |
workingDir |
| 构造器和说明 |
|---|
Ks3FileSystem() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.hadoop.fs.FSDataOutputStream |
append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress) |
boolean |
checkNotEmptyDir(org.apache.hadoop.fs.Path path) |
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) |
void |
createFakeDirectory(String objectName) |
org.apache.hadoop.fs.FSDataOutputStream |
createNonRecursive(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
EnumSet<org.apache.hadoop.fs.CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress) |
static long |
dateToLong(Date date) |
boolean |
delete(org.apache.hadoop.fs.Path f,
boolean recursive) |
boolean |
delete(org.apache.hadoop.fs.Path f,
boolean recursive,
Ks3FileStatus status) |
long |
getDefaultBlockSize(org.apache.hadoop.fs.Path f) |
org.apache.hadoop.fs.Path |
getDirectOutputPath(org.apache.hadoop.fs.Path qualifiedPath) |
Ks3FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f) |
Ks3FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f,
boolean checkSub) |
String |
getScheme() |
Ks3FileSystemStore |
getStore() |
URI |
getUri() |
org.apache.hadoop.fs.Path |
getWorkingDirectory() |
void |
initialize(URI name,
org.apache.hadoop.conf.Configuration conf)
Called after a new FileSystem instance is constructed.
|
boolean |
isNotEmptyDir(Ks3FileStatus ks3FileStatus) |
org.apache.hadoop.fs.Path |
keyToPath(String key) |
org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> |
listFiles(org.apache.hadoop.fs.Path f,
boolean recursive) |
protected org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> |
listLocatedStatus(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.PathFilter filter) |
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path f) |
org.apache.hadoop.fs.FileStatus[] |
listStatusWithFilter(org.apache.hadoop.fs.Path f,
boolean isFlat,
org.apache.hadoop.fs.PathFilter... filters) |
boolean |
mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission) |
boolean |
objectRepresentsDirectory(String name,
long size) |
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path f,
int bufferSize) |
String |
pathToKey(org.apache.hadoop.fs.Path path) |
static String |
pathToKey(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.Path workingDir) |
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
Renames Path src to Path dst
Warning: KS3 does not support renames.
|
boolean |
rename0(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst) |
void |
setWorkingDirectory(org.apache.hadoop.fs.Path new_dir) |
org.apache.hadoop.fs.Path |
toQ(org.apache.hadoop.fs.Path f) |
void |
validatePath(org.apache.hadoop.fs.Path f) |
access, addDelegationTokens, append, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, checkPath, clearStatistics, close, closeAll, closeAllForUGI, completeLocalOutput, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createFile, createNewFile, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listLocatedStatus, listStatus, listStatus, listStatus, listStatusBatch, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setOwner, setPermission, setReplication, setStoragePolicy, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncate, unsetStoragePolicypublic URI uri
public org.apache.hadoop.fs.Path workingDir
public long ks3BlockSize
public boolean ks3CheckSub
public Ks3FileSystemStore getStore()
public void initialize(URI name, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize 在类中 org.apache.hadoop.fs.FileSystemname - a uri whose authority section names the host, port, etc.
for this FileSystemconf - the configurationIOExceptionpublic String getScheme()
getScheme 在类中 org.apache.hadoop.fs.FileSystempublic URI getUri()
getUri 在类中 org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path f,
int bufferSize)
throws IOException
open 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic 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 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.FSDataOutputStream createNonRecursive(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
EnumSet<org.apache.hadoop.fs.CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
createNonRecursive 在类中 org.apache.hadoop.fs.FileSystemFileNotFoundException - if the parent directory is not present -or
is not a directory.IOExceptionpublic org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
append 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic boolean rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
Warning: KS3 does not support renames. This method does a copy which can take KS3 some time to execute with large files and directories. Since there is no Progressable passed in, this can time out jobs. Cases srcType dstType Result 1 file/dir N/A Copy 2 file/dir file Fail 3 file dir Fail 4 dir dir(not empty) Fail (whatever src type, is dst is not an empty dir, then will fail) 5 dir dir(empty) copy
rename 在类中 org.apache.hadoop.fs.FileSystemsrc - path to be renameddst - new path after renameIOException - on failurepublic boolean rename0(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
IOExceptionpublic boolean delete(org.apache.hadoop.fs.Path f,
boolean recursive)
throws IOException
delete 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic boolean delete(org.apache.hadoop.fs.Path f,
boolean recursive,
Ks3FileStatus status)
throws IOException
IOExceptionpublic org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f)
throws IOException
listStatus 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.FileStatus[] listStatusWithFilter(org.apache.hadoop.fs.Path f,
boolean isFlat,
org.apache.hadoop.fs.PathFilter... filters)
throws IOException
IOExceptionpublic org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> listFiles(org.apache.hadoop.fs.Path f,
boolean recursive)
throws IOException
listFiles 在类中 org.apache.hadoop.fs.FileSystemIOExceptionprotected org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> listLocatedStatus(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.PathFilter filter)
throws IOException
listLocatedStatus 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic void setWorkingDirectory(org.apache.hadoop.fs.Path new_dir)
setWorkingDirectory 在类中 org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory 在类中 org.apache.hadoop.fs.FileSystempublic boolean mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
throws IOException
mkdirs 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic void validatePath(org.apache.hadoop.fs.Path f)
throws IOException
IOExceptionpublic Ks3FileStatus getFileStatus(org.apache.hadoop.fs.Path f) throws IOException
getFileStatus 在类中 org.apache.hadoop.fs.FileSystemIOExceptionpublic Ks3FileStatus getFileStatus(org.apache.hadoop.fs.Path f, boolean checkSub) throws IOException
IOExceptionpublic long getDefaultBlockSize(org.apache.hadoop.fs.Path f)
getDefaultBlockSize 在类中 org.apache.hadoop.fs.FileSystempublic boolean objectRepresentsDirectory(String name, long size)
public static long dateToLong(Date date)
public void createFakeDirectory(String objectName)
public String pathToKey(org.apache.hadoop.fs.Path path)
public static String pathToKey(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.Path workingDir)
public org.apache.hadoop.fs.Path keyToPath(String key)
public org.apache.hadoop.fs.Path getDirectOutputPath(org.apache.hadoop.fs.Path qualifiedPath)
public org.apache.hadoop.fs.Path toQ(org.apache.hadoop.fs.Path f)
public boolean isNotEmptyDir(Ks3FileStatus ks3FileStatus) throws IOException
IOExceptionpublic boolean checkNotEmptyDir(org.apache.hadoop.fs.Path path)
Copyright © 2022. All rights reserved.