Package org.apache.accumulo.server.fs
Class VolumeManagerImpl
- java.lang.Object
-
- org.apache.accumulo.server.fs.VolumeManagerImpl
-
- All Implemented Interfaces:
VolumeManager
public class VolumeManagerImpl extends Object implements VolumeManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.server.fs.VolumeManager
VolumeManager.FileType
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVolumeManagerImpl(Map<String,Volume> volumes, Volume defaultVolume, AccumuloConfiguration conf, org.apache.hadoop.conf.Configuration hadoopConf)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringchoose(VolumeChooserEnvironment env, String[] options)voidclose()org.apache.hadoop.fs.FSDataOutputStreamcreate(org.apache.hadoop.fs.Path path)org.apache.hadoop.fs.FSDataOutputStreamcreate(org.apache.hadoop.fs.Path path, boolean overwrite)org.apache.hadoop.fs.FSDataOutputStreamcreate(org.apache.hadoop.fs.Path path, boolean overwrite, int bufferSize, short replication, long blockSize)booleancreateNewFile(org.apache.hadoop.fs.Path path)org.apache.hadoop.fs.FSDataOutputStreamcreateSyncable(org.apache.hadoop.fs.Path logPath, int bufferSize, short replication, long blockSize)booleandelete(org.apache.hadoop.fs.Path path)booleandeleteRecursively(org.apache.hadoop.fs.Path path)protected voidensureSyncIsEnabled()booleanexists(org.apache.hadoop.fs.Path path)static VolumeManagerget(AccumuloConfiguration conf, org.apache.hadoop.conf.Configuration hadoopConf)org.apache.hadoop.fs.ContentSummarygetContentSummary(org.apache.hadoop.fs.Path dir)shortgetDefaultReplication(org.apache.hadoop.fs.Path path)VolumegetDefaultVolume()Fetch the default Volumeorg.apache.hadoop.fs.FileStatusgetFileStatus(org.apache.hadoop.fs.Path path)org.apache.hadoop.fs.PathgetFullPath(Key key)org.apache.hadoop.fs.PathgetFullPath(TableId tableId, String path)org.apache.hadoop.fs.PathgetFullPath(VolumeManager.FileType fileType, String path)static VolumeManagergetLocal(String localBasePath)VolumegetVolumeByPath(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 pathPattern)booleanisReady()org.apache.hadoop.fs.FileStatus[]listStatus(org.apache.hadoop.fs.Path path)org.apache.hadoop.fs.PathmatchingFileSystem(org.apache.hadoop.fs.Path source, String[] options)booleanmkdirs(org.apache.hadoop.fs.Path path)booleanmkdirs(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.permission.FsPermission permission)booleanmoveToTrash(org.apache.hadoop.fs.Path path)org.apache.hadoop.fs.FSDataInputStreamopen(org.apache.hadoop.fs.Path path)booleanrename(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.Path newPath)
-
-
-
Constructor Detail
-
VolumeManagerImpl
protected VolumeManagerImpl(Map<String,Volume> volumes, Volume defaultVolume, AccumuloConfiguration conf, org.apache.hadoop.conf.Configuration hadoopConf)
-
-
Method Detail
-
getLocal
public static VolumeManager getLocal(String localBasePath) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceVolumeManager- Throws:
IOException
-
create
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
createin interfaceVolumeManager- Throws:
IOException
-
create
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path, boolean overwrite) throws IOException- Specified by:
createin interfaceVolumeManager- Throws:
IOException
-
create
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException- Specified by:
createin interfaceVolumeManager- Throws:
IOException
-
createNewFile
public boolean createNewFile(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
createNewFilein interfaceVolumeManager- Throws:
IOException
-
createSyncable
public org.apache.hadoop.fs.FSDataOutputStream createSyncable(org.apache.hadoop.fs.Path logPath, int bufferSize, short replication, long blockSize) throws IOException- Specified by:
createSyncablein interfaceVolumeManager- Throws:
IOException
-
delete
public boolean delete(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
deletein interfaceVolumeManager- Throws:
IOException
-
deleteRecursively
public boolean deleteRecursively(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
deleteRecursivelyin interfaceVolumeManager- Throws:
IOException
-
ensureSyncIsEnabled
protected void ensureSyncIsEnabled()
-
exists
public boolean exists(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
existsin interfaceVolumeManager- Throws:
IOException
-
getFileStatus
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
getFileStatusin interfaceVolumeManager- Throws:
IOException
-
getVolumeByPath
public Volume getVolumeByPath(org.apache.hadoop.fs.Path path)
- Specified by:
getVolumeByPathin interfaceVolumeManager
-
listStatus
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
listStatusin interfaceVolumeManager- Throws:
IOException
-
mkdirs
public boolean mkdirs(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
mkdirsin interfaceVolumeManager- Throws:
IOException
-
mkdirs
public boolean mkdirs(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException- Specified by:
mkdirsin interfaceVolumeManager- Throws:
IOException
-
open
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
openin interfaceVolumeManager- Throws:
IOException
-
rename
public boolean rename(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.Path newPath) throws IOException- Specified by:
renamein interfaceVolumeManager- Throws:
IOException
-
moveToTrash
public boolean moveToTrash(org.apache.hadoop.fs.Path path) throws IOException- Specified by:
moveToTrashin interfaceVolumeManager- Throws:
IOException
-
getDefaultReplication
public short getDefaultReplication(org.apache.hadoop.fs.Path path)
- Specified by:
getDefaultReplicationin interfaceVolumeManager
-
get
public static VolumeManager get(AccumuloConfiguration conf, org.apache.hadoop.conf.Configuration hadoopConf) throws IOException
- Throws:
IOException
-
isReady
public boolean isReady() throws IOException- Specified by:
isReadyin interfaceVolumeManager- Throws:
IOException
-
globStatus
public org.apache.hadoop.fs.FileStatus[] globStatus(org.apache.hadoop.fs.Path pathPattern) throws IOException- Specified by:
globStatusin interfaceVolumeManager- Throws:
IOException
-
getFullPath
public org.apache.hadoop.fs.Path getFullPath(Key key)
- Specified by:
getFullPathin interfaceVolumeManager
-
matchingFileSystem
public org.apache.hadoop.fs.Path matchingFileSystem(org.apache.hadoop.fs.Path source, String[] options)- Specified by:
matchingFileSystemin interfaceVolumeManager
-
getFullPath
public org.apache.hadoop.fs.Path getFullPath(TableId tableId, String path)
- Specified by:
getFullPathin interfaceVolumeManager
-
getFullPath
public org.apache.hadoop.fs.Path getFullPath(VolumeManager.FileType fileType, String path)
- Specified by:
getFullPathin interfaceVolumeManager
-
getContentSummary
public org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path dir) throws IOException- Specified by:
getContentSummaryin interfaceVolumeManager- Throws:
IOException
-
choose
public String choose(VolumeChooserEnvironment env, String[] options)
- Specified by:
choosein interfaceVolumeManager
-
getDefaultVolume
public Volume getDefaultVolume()
Description copied from interface:VolumeManagerFetch the default Volume- Specified by:
getDefaultVolumein interfaceVolumeManager
-
getVolumes
public Collection<Volume> getVolumes()
Description copied from interface:VolumeManagerFetch the configured Volumes, excluding the default Volume- Specified by:
getVolumesin interfaceVolumeManager
-
-