public final class HadoopBlockLocation extends java.lang.Object implements BlockLocation
Constructor and Description |
---|
HadoopBlockLocation(org.apache.hadoop.fs.BlockLocation blocklocation) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BlockLocation o) |
java.lang.String[] |
getHosts()
To get the hostname of the filename
|
long |
getLength()
Get the length of the block.
|
long |
getOffset()
Get the start offset of the file associated with this block.
|
public HadoopBlockLocation(org.apache.hadoop.fs.BlockLocation blocklocation)
public java.lang.String[] getHosts() throws java.io.IOException
getHosts
in interface BlockLocation
java.io.IOException
public long getLength()
BlockLocation
getLength
in interface BlockLocation
public long getOffset()
BlockLocation
getOffset
in interface BlockLocation
public int compareTo(BlockLocation o)
compareTo
in interface java.lang.Comparable<BlockLocation>