org.apache.accumulo.core.volume
Class VolumeImpl

java.lang.Object
  extended by org.apache.accumulo.core.volume.VolumeImpl
All Implemented Interfaces:
Volume

public class VolumeImpl
extends Object
implements Volume

Basic Volume implementation that contains a FileSystem and a base path that should be used within that filesystem.


Field Summary
protected  String basePath
           
protected  org.apache.hadoop.fs.FileSystem fs
           
 
Constructor Summary
VolumeImpl(org.apache.hadoop.fs.FileSystem fs, String basePath)
           
VolumeImpl(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
 boolean equals(Object o)
           
 String getBasePath()
          The base path which Accumulo will use within the given FileSystem
 org.apache.hadoop.fs.FileSystem getFileSystem()
          A FileSystem that Accumulo will use
 boolean isValidPath(org.apache.hadoop.fs.Path p)
          Determine if the Path is valid on this Volume.
 org.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 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 Volume
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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: Volume
A FileSystem that Accumulo will use

Specified by:
getFileSystem in interface Volume

getBasePath

public String getBasePath()
Description copied from interface: Volume
The base path which Accumulo will use within the given FileSystem

Specified by:
getBasePath in interface Volume

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 interface Volume
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 interface Volume

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

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 interface Volume
Parameters:
p - The suffix to use
Returns:
A Path for this Volume with the provided suffix


Copyright © 2015 Apache Accumulo Project. All rights reserved.