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 BlockLocationjava.io.IOExceptionpublic long getLength()
BlockLocationgetLength in interface BlockLocationpublic long getOffset()
BlockLocationgetOffset in interface BlockLocationpublic int compareTo(BlockLocation o)
compareTo in interface java.lang.Comparable<BlockLocation>