Package org.apache.flink.core.fs.local
Class LocalBlockLocation
- java.lang.Object
-
- org.apache.flink.core.fs.local.LocalBlockLocation
-
- All Implemented Interfaces:
Comparable<BlockLocation>,BlockLocation
@Internal public class LocalBlockLocation extends Object implements BlockLocation
Implementation of theBlockLocationinterface 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 Summary
Constructors Constructor Description LocalBlockLocation(long length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(BlockLocation o)String[]getHosts()Get the list of hosts (hostname) hosting this block.longgetLength()Get the length of the block.longgetOffset()Get the start offset of the file associated with this block.
-
-
-
Method Detail
-
getHosts
public String[] getHosts()
Description copied from interface:BlockLocationGet the list of hosts (hostname) hosting this block.- Specified by:
getHostsin interfaceBlockLocation- Returns:
- A list of hosts (hostname) hosting this block.
-
getLength
public long getLength()
Description copied from interface:BlockLocationGet the length of the block.- Specified by:
getLengthin interfaceBlockLocation- Returns:
- the length of the block
-
getOffset
public long getOffset()
Description copied from interface:BlockLocationGet the start offset of the file associated with this block.- Specified by:
getOffsetin interfaceBlockLocation- Returns:
- The start offset of the file associated with this block.
-
compareTo
public int compareTo(BlockLocation o)
- Specified by:
compareToin interfaceComparable<BlockLocation>
-
-