Package dev.vortex.spark
Class VortexOptions
java.lang.Object
dev.vortex.spark.VortexOptions
- All Implemented Interfaces:
Serializable
The format options of one Spark read or write, resolved without regard to key case.
Spark treats data source options as case-insensitive, but the connector is reached through maps that disagree: a
V2 scan carries the keys as the user typed them, while the V1 file format lower-cases them first. Every
vortex.* lookup goes through here so both paths answer the same.
The keys as given are kept too. Hadoop configuration keys are case-sensitive, so asCaseSensitiveMap() is
what feeds a Hadoop Configuration.
Built on the driver and shipped to executors inside the reader and writer factories.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThe options with the keys as given, for the case-sensitive world of Hadoop configuration.static VortexOptionsempty()No options at all, for callers with no Spark read or write to draw them from.booleanThe value set forkeyunder any casing.The value set forkeyunder any casing, orfallbackwhen it is not set.booleangetBoolean(String key, boolean fallback) The value set forkeyas a boolean, orfallbackwhen it is not set.intThe value set forkeyas an integer, orfallbackwhen it is not set.inthashCode()static VortexOptionsCapturesoptionsas given.toString()
-
Method Details
-
of
Capturesoptionsas given. A null map is read as no options at all. -
empty
No options at all, for callers with no Spark read or write to draw them from. -
asCaseSensitiveMap
The options with the keys as given, for the case-sensitive world of Hadoop configuration. -
get
The value set forkeyunder any casing. -
get
The value set forkeyunder any casing, orfallbackwhen it is not set. -
getInt
The value set forkeyas an integer, orfallbackwhen it is not set.- Throws:
IllegalArgumentException- if the value is not an integer
-
getBoolean
The value set forkeyas a boolean, orfallbackwhen it is not set.- Throws:
IllegalArgumentException- if the value is neithertruenorfalse
-
equals
-
hashCode
public int hashCode() -
toString
-