Package org.apache.accumulo.core.volume
Class VolumeImpl
- java.lang.Object
-
- org.apache.accumulo.core.volume.VolumeImpl
-
-
Constructor Summary
Constructors Constructor Description VolumeImpl(org.apache.hadoop.fs.FileSystem fs, String basePath)VolumeImpl(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetBasePath()The base path which Accumulo will use within the givenFileSystemorg.apache.hadoop.fs.FileSystemgetFileSystem()AFileSystemthat Accumulo will useinthashCode()booleanisValidPath(org.apache.hadoop.fs.Path p)Determine if the Path is valid on this Volume.org.apache.hadoop.fs.PathprefixChild(String p)Convert the given child path into a Path that is relative to the base path for this Volumeorg.apache.hadoop.fs.PathprefixChild(org.apache.hadoop.fs.Path p)Convert the given Path into a Path that is relative to the base path for this VolumeStringtoString()
-
-
-
Field Detail
-
fs
protected final org.apache.hadoop.fs.FileSystem fs
-
basePath
protected final String basePath
-
-
Constructor Detail
-
VolumeImpl
public VolumeImpl(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws IOException- Throws:
IOException
-
VolumeImpl
public VolumeImpl(org.apache.hadoop.fs.FileSystem fs, String basePath)
-
-
Method Detail
-
getFileSystem
public org.apache.hadoop.fs.FileSystem getFileSystem()
Description copied from interface:VolumeAFileSystemthat Accumulo will use- Specified by:
getFileSystemin interfaceVolume
-
getBasePath
public String getBasePath()
Description copied from interface:VolumeThe base path which Accumulo will use within the givenFileSystem- Specified by:
getBasePathin interfaceVolume
-
prefixChild
public org.apache.hadoop.fs.Path prefixChild(org.apache.hadoop.fs.Path p)
Description copied from interface:VolumeConvert the given Path into a Path that is relative to the base path for this Volume- Specified by:
prefixChildin interfaceVolume- Parameters:
p- The suffix to use- Returns:
- A Path for this Volume with the provided suffix
-
isValidPath
public boolean isValidPath(org.apache.hadoop.fs.Path p)
Description copied from interface:VolumeDetermine if the Path is valid on this Volume. A Path is valid if it is contained in the Volume's FileSystem and is rooted beneath the basePath- Specified by:
isValidPathin interfaceVolume
-
prefixChild
public org.apache.hadoop.fs.Path prefixChild(String p)
Description copied from interface:VolumeConvert the given child path into a Path that is relative to the base path for this Volume- Specified by:
prefixChildin interfaceVolume- Parameters:
p- The suffix to use- Returns:
- A Path for this Volume with the provided suffix
-
-