Package dev.vortex.spark.io
Class VortexIo
java.lang.Object
dev.vortex.spark.io.VortexIo
- All Implemented Interfaces:
Serializable
The Hadoop configuration this Spark job reaches storage with, and the read settings that go with it.
File contents are read and written through Hadoop streams, so the connector sees the same schemes and credential
providers as Spark's file index and commit protocol. Reads open a HadoopReadable; writes go through
HadoopWritable on the task path Spark's commit protocol assigns.
Built on the driver and shipped to executors, so the configuration travels with it.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOption bounding how many concurrent read upcalls the native reader issues against one file. -
Method Summary
Modifier and TypeMethodDescriptionstatic VortexIocreate(VortexOptions options, org.apache.hadoop.conf.Configuration hadoopConf) CaptureshadoopConfand the read settings found in the format options.static VortexIodefaults()Hadoop I/O over a default configuration, for callers that have no Spark session to draw one from.org.apache.hadoop.conf.Configurationdev.vortex.io.NativeReadableopenReadable(VortexFile file) Opens a byte source forfile, stating it only if the listing that produced it did not report a size.intBound on concurrent read upcalls per file; zero keeps the native default.
-
Field Details
-
READ_CONCURRENCY_OPTION
Option bounding how many concurrent read upcalls the native reader issues against one file. Each in-flight upcall leases one pooled Hadoop input stream. Zero keeps the native default.- See Also:
-
-
Method Details
-
create
public static VortexIo create(VortexOptions options, org.apache.hadoop.conf.Configuration hadoopConf) CaptureshadoopConfand the read settings found in the format options. -
defaults
Hadoop I/O over a default configuration, for callers that have no Spark session to draw one from. -
hadoopConf
public org.apache.hadoop.conf.Configuration hadoopConf() -
readConcurrency
public int readConcurrency()Bound on concurrent read upcalls per file; zero keeps the native default. -
openReadable
Opens a byte source forfile, stating it only if the listing that produced it did not report a size. The caller owns the result and must close it once the scan built on it is done.The readers skip listed files without
VortexFile.EXTENSIONbefore they get here. The check stops any other path from opening such a file as Vortex data.- Throws:
IllegalArgumentException- if the path does not carryVortexFile.EXTENSION
-