public class LocalBlockLocation extends java.lang.Object implements BlockLocation
BlockLocation interface for a local file system.| Constructor and Description |
|---|
LocalBlockLocation(java.lang.String host,
long length) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BlockLocation o) |
java.lang.String[] |
getHosts()
Get the list of hosts (hostname) hosting this block.
|
long |
getLength()
Get the length of the block.
|
long |
getOffset()
Get the start offset of the file associated with this block.
|
public java.lang.String[] getHosts()
throws java.io.IOException
BlockLocationgetHosts in interface BlockLocationjava.io.IOException - thrown if the list of hosts could not be retrievedpublic long getLength()
BlockLocationgetLength in interface BlockLocationpublic long getOffset()
BlockLocationgetOffset in interface BlockLocationpublic int compareTo(BlockLocation o)
compareTo in interface java.lang.Comparable<BlockLocation>