Package dev.vortex.spark.io
Class HadoopReadable
java.lang.Object
dev.vortex.io.PooledReadable
dev.vortex.spark.io.HadoopReadable
- All Implemented Interfaces:
dev.vortex.io.NativeReadable,Closeable,AutoCloseable
public final class HadoopReadable
extends dev.vortex.io.PooledReadable
A
NativeReadable that serves Vortex's reads from a Hadoop FileSystem.-
Nested Class Summary
Nested classes/interfaces inherited from class dev.vortex.io.PooledReadable
dev.vortex.io.PooledReadable.PositionalStream, dev.vortex.io.PooledReadable.ScratchBytes -
Field Summary
Fields inherited from interface dev.vortex.io.NativeReadable
DEFAULT_COALESCE_DISTANCE, DEFAULT_COALESCE_MAX_SIZE -
Method Summary
Modifier and TypeMethodDescriptionintintstatic HadoopReadableOpens a readable overpath, stating the file for its length.static HadoopReadableOpens a readable overpath.static HadoopReadableopen(org.apache.hadoop.conf.Configuration conf, String path, long length, int coalesceDistance, int coalesceMaxSize) Opens a readable with the given coalescing gap and maximum merged size, both in bytes.protected dev.vortex.io.PooledReadable.PositionalStreamMethods inherited from class dev.vortex.io.PooledReadable
close, length, name, readFully
-
Method Details
-
open
Opens a readable overpath, stating the file for its length. -
open
public static HadoopReadable open(org.apache.hadoop.conf.Configuration conf, String path, long length) Opens a readable overpath. A non-negativelengthis taken as authoritative — the driver already stats every file when it plans the scan, so executors need not stat them again. -
open
public static HadoopReadable open(org.apache.hadoop.conf.Configuration conf, String path, long length, int coalesceDistance, int coalesceMaxSize) Opens a readable with the given coalescing gap and maximum merged size, both in bytes. Native code rejects a negative gap or non-positive size when the source is registered. -
coalesceDistance
public int coalesceDistance() -
coalesceMaxSize
public int coalesceMaxSize() -
openStream
- Specified by:
openStreamin classdev.vortex.io.PooledReadable- Throws:
IOException
-