Class LocalBlockLocation

  • All Implemented Interfaces:
    Comparable<BlockLocation>, BlockLocation

    @Internal
    public class LocalBlockLocation
    extends Object
    implements BlockLocation
    Implementation of the BlockLocation interface for a local file system.

    Local files have only one block that represents the entire file. The block has no location information, because it is not accessible where the files (or their block) actually reside, especially in cases where the files are on a mounted file system.

    • Constructor Detail

      • LocalBlockLocation

        public LocalBlockLocation​(long length)
    • Method Detail

      • getHosts

        public String[] getHosts()
        Description copied from interface: BlockLocation
        Get the list of hosts (hostname) hosting this block.
        Specified by:
        getHosts in interface BlockLocation
        Returns:
        A list of hosts (hostname) hosting this block.
      • getLength

        public long getLength()
        Description copied from interface: BlockLocation
        Get the length of the block.
        Specified by:
        getLength in interface BlockLocation
        Returns:
        the length of the block
      • getOffset

        public long getOffset()
        Description copied from interface: BlockLocation
        Get the start offset of the file associated with this block.
        Specified by:
        getOffset in interface BlockLocation
        Returns:
        The start offset of the file associated with this block.