Class TestHRegionFileSystem.MockFileSystem
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.hadoop.hbase.regionserver.TestHRegionFileSystem.MockFileSystem
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.conf.Configurable
- Direct Known Subclasses:
TestHRegionFileSystem.MockFileSystemForCreate
- Enclosing class:
- TestHRegionFileSystem
a mock fs which throws exception for first 3 times, and then process the call (returns the
excepted result).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem
org.apache.hadoop.fs.FileSystem.DirectoryEntries, org.apache.hadoop.fs.FileSystem.Statistics -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) static final intFields inherited from class org.apache.hadoop.fs.FileSystem
DEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, statistics, TRASH_PREFIX, USER_HOME_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.FSDataOutputStreamappend(org.apache.hadoop.fs.Path arg0, int arg1, org.apache.hadoop.util.Progressable arg2) org.apache.hadoop.fs.FSDataOutputStreamcreate(org.apache.hadoop.fs.Path arg0, org.apache.hadoop.fs.permission.FsPermission arg1, boolean arg2, int arg3, short arg4, long arg5, org.apache.hadoop.util.Progressable arg6) booleandelete(org.apache.hadoop.fs.Path arg0) booleandelete(org.apache.hadoop.fs.Path arg0, boolean arg1) booleanexists(org.apache.hadoop.fs.Path path) org.apache.hadoop.fs.FileStatusgetFileStatus(org.apache.hadoop.fs.Path arg0) getUri()org.apache.hadoop.fs.Pathorg.apache.hadoop.fs.FileStatus[]listStatus(org.apache.hadoop.fs.Path arg0) booleanmkdirs(org.apache.hadoop.fs.Path arg0, org.apache.hadoop.fs.permission.FsPermission arg1) org.apache.hadoop.fs.FSDataInputStreamopen(org.apache.hadoop.fs.Path arg0, int arg1) booleanrename(org.apache.hadoop.fs.Path arg0, org.apache.hadoop.fs.Path arg1) voidsetWorkingDirectory(org.apache.hadoop.fs.Path arg0) Methods inherited from class org.apache.hadoop.fs.FileSystem
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, createNonRecursive, createSnapshot, createSnapshot, createSymlink, deleteOnExit, deleteSnapshot, enableSymlinks, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getQuotaUsage, getReplication, getScheme, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, initialize, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusBatch, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, msync, newInstance, newInstance, newInstance, newInstanceLocal, 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, unsetStoragePolicyMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Field Details
-
retryCount
int retryCount -
successRetryCount
- See Also:
-
-
Constructor Details
-
MockFileSystem
public MockFileSystem()
-
-
Method Details
-
append
public org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path arg0, int arg1, org.apache.hadoop.util.Progressable arg2) throws IOException - Specified by:
appendin classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
create
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path arg0, org.apache.hadoop.fs.permission.FsPermission arg1, boolean arg2, int arg3, short arg4, long arg5, org.apache.hadoop.util.Progressable arg6) throws IOException - Specified by:
createin classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
delete
- Overrides:
deletein classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
delete
- Specified by:
deletein classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
getFileStatus
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path arg0) throws IOException - Specified by:
getFileStatusin classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
exists
- Overrides:
existsin classorg.apache.hadoop.fs.FileSystem
-
getUri
- Specified by:
getUriin classorg.apache.hadoop.fs.FileSystem
-
getWorkingDirectory
- Specified by:
getWorkingDirectoryin classorg.apache.hadoop.fs.FileSystem
-
listStatus
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path arg0) throws IOException - Specified by:
listStatusin classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
mkdirs
public boolean mkdirs(org.apache.hadoop.fs.Path arg0, org.apache.hadoop.fs.permission.FsPermission arg1) throws IOException - Specified by:
mkdirsin classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
open
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path arg0, int arg1) throws IOException - Specified by:
openin classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
rename
public boolean rename(org.apache.hadoop.fs.Path arg0, org.apache.hadoop.fs.Path arg1) throws IOException - Specified by:
renamein classorg.apache.hadoop.fs.FileSystem- Throws:
IOException
-
setWorkingDirectory
- Specified by:
setWorkingDirectoryin classorg.apache.hadoop.fs.FileSystem
-