@Internal public class LocalBlockLocation extends Object implements BlockLocation
BlockLocation
interface for a local file system.
Local files have only one block that represents the entire file. The block has no location information, because it is not accessible where the files (or their block) actually reside, especially in cases where the files are on a mounted file system.
Constructor and Description |
---|
LocalBlockLocation(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 String[] getHosts()
BlockLocation
getHosts
in interface BlockLocation
public long getLength()
BlockLocation
getLength
in interface BlockLocation
public long getOffset()
BlockLocation
getOffset
in interface BlockLocation
public int compareTo(BlockLocation o)
compareTo
in interface Comparable<BlockLocation>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.