Package org.apache.accumulo.core.volume
Class NonConfiguredVolume
- java.lang.Object
-
- org.apache.accumulo.core.volume.NonConfiguredVolume
-
- All Implemented Interfaces:
Volume
public class NonConfiguredVolume extends Object implements Volume
Volume implementation which represents a Volume for which we have a FileSystem but no base path because it is not configured viaProperty.INSTANCE_VOLUMES
This is useful to handle volumes that have been removed from accumulo-site.xml but references to these volumes have not been updated. This Volume should never be used to create new files, only to read existing files.
-
-
Constructor Summary
Constructors Constructor Description NonConfiguredVolume(org.apache.hadoop.fs.FileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getBasePath()
The base path which Accumulo will use within the givenFileSystem
org.apache.hadoop.fs.FileSystem
getFileSystem()
AFileSystem
that Accumulo will useint
hashCode()
boolean
isValidPath(org.apache.hadoop.fs.Path p)
Determine if the Path is valid on this Volume.org.apache.hadoop.fs.Path
prefixChild(String p)
Convert the given child path into a Path that is relative to the base path for this Volumeorg.apache.hadoop.fs.Path
prefixChild(org.apache.hadoop.fs.Path p)
Convert the given Path into a Path that is relative to the base path for this VolumeString
toString()
-
-
-
Method Detail
-
getFileSystem
public org.apache.hadoop.fs.FileSystem getFileSystem()
Description copied from interface:Volume
AFileSystem
that Accumulo will use- Specified by:
getFileSystem
in interfaceVolume
-
getBasePath
public String getBasePath()
Description copied from interface:Volume
The base path which Accumulo will use within the givenFileSystem
- Specified by:
getBasePath
in interfaceVolume
-
prefixChild
public org.apache.hadoop.fs.Path prefixChild(org.apache.hadoop.fs.Path p)
Description copied from interface:Volume
Convert the given Path into a Path that is relative to the base path for this Volume- Specified by:
prefixChild
in interfaceVolume
- Parameters:
p
- The suffix to use- Returns:
- A Path for this Volume with the provided suffix
-
prefixChild
public org.apache.hadoop.fs.Path prefixChild(String p)
Description copied from interface:Volume
Convert the given child path into a Path that is relative to the base path for this Volume- Specified by:
prefixChild
in 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:Volume
Determine 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:
isValidPath
in interfaceVolume
-
-