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
BlockLocation
getHosts
in interface BlockLocation
java.io.IOException
- thrown if the list of hosts could not be retrievedpublic 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>