public class VolumeManagerImpl extends Object implements VolumeManager
VolumeManager.FileType
Modifier | Constructor and Description |
---|---|
protected |
VolumeManagerImpl(Map<String,Volume> volumes,
Volume defaultVolume,
AccumuloConfiguration conf) |
Modifier and Type | Method and 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 path) |
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path path,
boolean overwrite) |
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path path,
boolean overwrite,
int bufferSize,
short replication,
long blockSize) |
boolean |
createNewFile(org.apache.hadoop.fs.Path path) |
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) |
protected void |
ensureSyncIsEnabled() |
boolean |
exists(org.apache.hadoop.fs.Path path) |
static VolumeManager |
get() |
static VolumeManager |
get(AccumuloConfiguration conf) |
static VolumeManager |
get(AccumuloConfiguration conf,
org.apache.hadoop.conf.Configuration hadoopConf) |
org.apache.hadoop.fs.ContentSummary |
getContentSummary(org.apache.hadoop.fs.Path dir) |
short |
getDefaultReplication(org.apache.hadoop.fs.Path path) |
Volume |
getDefaultVolume()
Fetch the default Volume
|
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path path) |
org.apache.hadoop.fs.Path |
getFullPath(Key key) |
org.apache.hadoop.fs.Path |
getFullPath(String tableId,
String path) |
org.apache.hadoop.fs.Path |
getFullPath(VolumeManager.FileType fileType,
String path) |
static VolumeManager |
getLocal(String localBasePath) |
Volume |
getVolumeByPath(org.apache.hadoop.fs.Path path) |
Collection<Volume> |
getVolumes()
Fetch the configured Volumes, excluding the default Volume
|
org.apache.hadoop.fs.FileStatus[] |
globStatus(org.apache.hadoop.fs.Path pathPattern) |
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 path) |
boolean |
mkdirs(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission) |
boolean |
moveToTrash(org.apache.hadoop.fs.Path path) |
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) |
protected VolumeManagerImpl(Map<String,Volume> volumes, Volume defaultVolume, AccumuloConfiguration conf)
public static VolumeManager getLocal(String localBasePath) throws IOException
IOException
public void close() throws IOException
close
in interface VolumeManager
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path) throws IOException
create
in interface VolumeManager
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path, boolean overwrite) throws IOException
create
in interface VolumeManager
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException
create
in interface VolumeManager
IOException
public boolean createNewFile(org.apache.hadoop.fs.Path path) throws IOException
createNewFile
in interface VolumeManager
IOException
public org.apache.hadoop.fs.FSDataOutputStream createSyncable(org.apache.hadoop.fs.Path logPath, int bufferSize, short replication, long blockSize) throws IOException
createSyncable
in interface VolumeManager
IOException
public boolean delete(org.apache.hadoop.fs.Path path) throws IOException
delete
in interface VolumeManager
IOException
public boolean deleteRecursively(org.apache.hadoop.fs.Path path) throws IOException
deleteRecursively
in interface VolumeManager
IOException
protected void ensureSyncIsEnabled()
public boolean exists(org.apache.hadoop.fs.Path path) throws IOException
exists
in interface VolumeManager
IOException
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path path) throws IOException
getFileStatus
in interface VolumeManager
IOException
public Volume getVolumeByPath(org.apache.hadoop.fs.Path path)
getVolumeByPath
in interface VolumeManager
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path path) throws IOException
listStatus
in interface VolumeManager
IOException
public boolean mkdirs(org.apache.hadoop.fs.Path path) throws IOException
mkdirs
in interface VolumeManager
IOException
public boolean mkdirs(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException
mkdirs
in interface VolumeManager
IOException
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path path) throws IOException
open
in interface VolumeManager
IOException
public boolean rename(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.Path newPath) throws IOException
rename
in interface VolumeManager
IOException
public boolean moveToTrash(org.apache.hadoop.fs.Path path) throws IOException
moveToTrash
in interface VolumeManager
IOException
public short getDefaultReplication(org.apache.hadoop.fs.Path path)
getDefaultReplication
in interface VolumeManager
public boolean isFile(org.apache.hadoop.fs.Path path) throws IOException
isFile
in interface VolumeManager
IOException
public static VolumeManager get() throws IOException
IOException
public static VolumeManager get(AccumuloConfiguration conf) throws IOException
IOException
public static VolumeManager get(AccumuloConfiguration conf, org.apache.hadoop.conf.Configuration hadoopConf) throws IOException
IOException
public boolean isReady() throws IOException
isReady
in interface VolumeManager
IOException
public org.apache.hadoop.fs.FileStatus[] globStatus(org.apache.hadoop.fs.Path pathPattern) throws IOException
globStatus
in interface VolumeManager
IOException
public org.apache.hadoop.fs.Path getFullPath(Key key)
getFullPath
in interface VolumeManager
public org.apache.hadoop.fs.Path matchingFileSystem(org.apache.hadoop.fs.Path source, String[] options)
matchingFileSystem
in interface VolumeManager
public org.apache.hadoop.fs.Path getFullPath(String tableId, String path)
getFullPath
in interface VolumeManager
public org.apache.hadoop.fs.Path getFullPath(VolumeManager.FileType fileType, String path)
getFullPath
in interface VolumeManager
public org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path dir) throws IOException
getContentSummary
in interface VolumeManager
IOException
public String choose(com.google.common.base.Optional<String> tableId, String[] options)
choose
in interface VolumeManager
public Volume getDefaultVolume()
VolumeManager
getDefaultVolume
in interface VolumeManager
public Collection<Volume> getVolumes()
VolumeManager
getVolumes
in interface VolumeManager
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.