Class HadoopBlockLocation

    • Constructor Detail

      • HadoopBlockLocation

        public HadoopBlockLocation​(org.apache.hadoop.fs.BlockLocation blockLocation)
        Creates a new block location.
        Parameters:
        blockLocation - the original HDFS block location
    • Method Detail

      • getHosts

        public String[] getHosts()
                          throws IOException
        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.
        Throws:
        IOException - thrown if the list of hosts could not be retrieved
      • 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.