@Internal public class LocalBlockLocation extends Object implements BlockLocation
BlockLocation interface for a local file system.| Constructor and Description |
|---|
LocalBlockLocation(String host,
long length) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BlockLocation o) |
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 LocalBlockLocation(String host, long length)
public String[] getHosts() throws IOException
BlockLocationgetHosts in interface BlockLocationIOException - 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 Comparable<BlockLocation>Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.