Interface Volume

  • All Known Implementing Classes:
    VolumeImpl

    public interface Volume
    Encapsulates a FileSystem and a base Path within that filesystem. This also avoid the necessity to pass around a Configuration.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean containsPath​(org.apache.hadoop.fs.Path path)
      Determine if the Path is contained in Volume.
      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
      org.apache.hadoop.fs.Path prefixChild​(String pathString)
      Convert the given child path into a Path that is relative to the base path for this Volume.
    • Method Detail

      • getFileSystem

        org.apache.hadoop.fs.FileSystem getFileSystem()
        A FileSystem that Accumulo will use
      • getBasePath

        String getBasePath()
        The base path which Accumulo will use within the given FileSystem
      • prefixChild

        org.apache.hadoop.fs.Path prefixChild​(String pathString)
        Convert the given child path into a Path that is relative to the base path for this Volume. The supplied path should not include any scheme (such as file: or hdfs:), and should not contain any relative path "breakout" patterns, such as ../. If the path begins with a single slash, it will be preserved while prefixing this volume. If it does not begin with a single slash, one will be inserted.
        Parameters:
        pathString - The suffix to use
        Returns:
        A Path for this Volume with the provided suffix
      • containsPath

        boolean containsPath​(org.apache.hadoop.fs.Path path)
        Determine if the Path is contained in Volume. A Path is considered contained if refers to a location within the base path for this Volume on the same FileSystem. It can be located at the base path, or within any sub-directory. Unqualified paths (those without a file system scheme) will resolve to using the configured Hadoop default file system before comparison. Paths are not considered "contained" within this Volume if they have any relative path "breakout" patterns, such as ../.