Package org.apache.accumulo.server.fs
Interface VolumeManager
-
- All Known Implementing Classes:
VolumeManagerImpl
public interface VolumeManager
A wrapper around multiple hadoop FileSystem objects, which are assumed to be different volumes. This also concentrates a bunch of meta-operations like waiting for SAFE_MODE, and closing WALs. N.B. implementations must be thread safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VolumeManager.FileType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
choose(com.google.common.base.Optional<String> tableId, String[] options)
void
close()
org.apache.hadoop.fs.FSDataOutputStream
create(org.apache.hadoop.fs.Path dest)
org.apache.hadoop.fs.FSDataOutputStream
create(org.apache.hadoop.fs.Path path, boolean b)
org.apache.hadoop.fs.FSDataOutputStream
create(org.apache.hadoop.fs.Path path, boolean b, int int1, short int2, long long1)
boolean
createNewFile(org.apache.hadoop.fs.Path writable)
org.apache.hadoop.fs.FSDataOutputStream
createSyncable(org.apache.hadoop.fs.Path logPath, int buffersize, short replication, long blockSize)
boolean
delete(org.apache.hadoop.fs.Path path)
boolean
deleteRecursively(org.apache.hadoop.fs.Path path)
boolean
exists(org.apache.hadoop.fs.Path path)
org.apache.hadoop.fs.ContentSummary
getContentSummary(org.apache.hadoop.fs.Path dir)
short
getDefaultReplication(org.apache.hadoop.fs.Path logPath)
Volume
getDefaultVolume()
Fetch the default Volumeorg.apache.hadoop.fs.FileStatus
getFileStatus(org.apache.hadoop.fs.Path path)
org.apache.hadoop.fs.Path
getFullPath(String tableId, String path)
org.apache.hadoop.fs.Path
getFullPath(Key key)
org.apache.hadoop.fs.Path
getFullPath(VolumeManager.FileType fileType, String fileName)
Volume
getVolumeByPath(org.apache.hadoop.fs.Path path)
Collection<Volume>
getVolumes()
Fetch the configured Volumes, excluding the default Volumeorg.apache.hadoop.fs.FileStatus[]
globStatus(org.apache.hadoop.fs.Path path)
boolean
isFile(org.apache.hadoop.fs.Path path)
boolean
isReady()
org.apache.hadoop.fs.FileStatus[]
listStatus(org.apache.hadoop.fs.Path path)
org.apache.hadoop.fs.Path
matchingFileSystem(org.apache.hadoop.fs.Path source, String[] options)
boolean
mkdirs(org.apache.hadoop.fs.Path directory)
boolean
mkdirs(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.permission.FsPermission permission)
boolean
moveToTrash(org.apache.hadoop.fs.Path sourcePath)
org.apache.hadoop.fs.FSDataInputStream
open(org.apache.hadoop.fs.Path path)
boolean
rename(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.Path newPath)
-
-
-
Method Detail
-
close
void close() throws IOException
- Throws:
IOException
-
create
org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path dest) throws IOException
- Throws:
IOException
-
create
org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path, boolean b) throws IOException
- Throws:
IOException
-
create
org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path, boolean b, int int1, short int2, long long1) throws IOException
- Throws:
IOException
-
createNewFile
boolean createNewFile(org.apache.hadoop.fs.Path writable) throws IOException
- Throws:
IOException
-
createSyncable
org.apache.hadoop.fs.FSDataOutputStream createSyncable(org.apache.hadoop.fs.Path logPath, int buffersize, short replication, long blockSize) throws IOException
- Throws:
IOException
-
delete
boolean delete(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
deleteRecursively
boolean deleteRecursively(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
exists
boolean exists(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
getFileStatus
org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
getVolumeByPath
Volume getVolumeByPath(org.apache.hadoop.fs.Path path)
-
matchingFileSystem
org.apache.hadoop.fs.Path matchingFileSystem(org.apache.hadoop.fs.Path source, String[] options)
-
listStatus
org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
mkdirs
boolean mkdirs(org.apache.hadoop.fs.Path directory) throws IOException
- Throws:
IOException
-
mkdirs
boolean mkdirs(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
- Throws:
IOException
-
open
org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
rename
boolean rename(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.Path newPath) throws IOException
- Throws:
IOException
-
moveToTrash
boolean moveToTrash(org.apache.hadoop.fs.Path sourcePath) throws IOException
- Throws:
IOException
-
getDefaultReplication
short getDefaultReplication(org.apache.hadoop.fs.Path logPath)
-
isFile
boolean isFile(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
isReady
boolean isReady() throws IOException
- Throws:
IOException
-
globStatus
org.apache.hadoop.fs.FileStatus[] globStatus(org.apache.hadoop.fs.Path path) throws IOException
- Throws:
IOException
-
getFullPath
org.apache.hadoop.fs.Path getFullPath(Key key)
-
getFullPath
org.apache.hadoop.fs.Path getFullPath(VolumeManager.FileType fileType, String fileName) throws IOException
- Throws:
IOException
-
getContentSummary
org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path dir) throws IOException
- Throws:
IOException
-
getDefaultVolume
Volume getDefaultVolume()
Fetch the default Volume
-
getVolumes
Collection<Volume> getVolumes()
Fetch the configured Volumes, excluding the default Volume
-
-