Class DefaultCortexConnectionStreamReader.CortexReadStreamParameters
- java.lang.Object
-
- com.c12e.cortex.profiles.module.connection.DefaultCortexConnectionStreamReader.CortexReadStreamParameters
-
- All Implemented Interfaces:
CortexConnectionStreamReader
,CortexReader<CortexDataSourcePair,CortexConnectionStreamReader>
- Enclosing class:
- DefaultCortexConnectionStreamReader
public class DefaultCortexConnectionStreamReader.CortexReadStreamParameters extends java.lang.Object implements CortexConnectionStreamReader
-
-
Field Summary
Fields Modifier and Type Field Description protected com.c12e.cortex.phoenix.Connection
connection
protected java.lang.String
connectionName
protected java.lang.String
project
protected org.apache.spark.sql.types.StructType
schema
protected SparkOptionsHandler
sparkOptionsHandler
-
Constructor Summary
Constructors Constructor Description CortexReadStreamParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CortexDataSourcePair
load()
Completes building and begins read processCortexConnectionStreamReader
option(java.lang.String key, java.lang.String value)
Overwrites value at keyCortexConnectionStreamReader
options(java.util.Map<java.lang.String,java.lang.String> readOptions)
Merges new options with current optionsCortexConnectionStreamReader
project(java.lang.String project)
Sets the projectCortexConnectionStreamReader
resourceName(java.lang.String resourceName)
Sets the resource to write toCortexConnectionStreamReader
schema(org.apache.spark.sql.types.StructType schema)
Override dataset schema when ableCortexConnectionStreamReader
withConnection(com.c12e.cortex.phoenix.Connection connection)
Override connection write
-
-
-
Field Detail
-
project
protected java.lang.String project
-
connectionName
protected java.lang.String connectionName
-
sparkOptionsHandler
protected SparkOptionsHandler sparkOptionsHandler
-
connection
protected com.c12e.cortex.phoenix.Connection connection
-
schema
protected org.apache.spark.sql.types.StructType schema
-
-
Method Detail
-
resourceName
public CortexConnectionStreamReader resourceName(java.lang.String resourceName)
Description copied from interface:CortexReader
Sets the resource to write to- Specified by:
resourceName
in interfaceCortexReader<CortexDataSourcePair,CortexConnectionStreamReader>
- Returns:
- this instance
-
options
public CortexConnectionStreamReader options(java.util.Map<java.lang.String,java.lang.String> readOptions)
Description copied from interface:CortexReader
Merges new options with current options- Specified by:
options
in interfaceCortexReader<CortexDataSourcePair,CortexConnectionStreamReader>
- Returns:
- this instance
-
option
public CortexConnectionStreamReader option(java.lang.String key, java.lang.String value)
Description copied from interface:CortexReader
Overwrites value at key- Specified by:
option
in interfaceCortexReader<CortexDataSourcePair,CortexConnectionStreamReader>
- Returns:
- this instance
-
withConnection
public CortexConnectionStreamReader withConnection(com.c12e.cortex.phoenix.Connection connection)
Description copied from interface:CortexConnectionStreamReader
Override connection write- Specified by:
withConnection
in interfaceCortexConnectionStreamReader
- Returns:
- this instance
-
project
public CortexConnectionStreamReader project(java.lang.String project)
Description copied from interface:CortexReader
Sets the project- Specified by:
project
in interfaceCortexReader<CortexDataSourcePair,CortexConnectionStreamReader>
- Returns:
- this instance
-
load
public CortexDataSourcePair load()
Description copied from interface:CortexReader
Completes building and begins read process- Specified by:
load
in interfaceCortexReader<CortexDataSourcePair,CortexConnectionStreamReader>
-
schema
public CortexConnectionStreamReader schema(org.apache.spark.sql.types.StructType schema)
Description copied from interface:CortexConnectionStreamReader
Override dataset schema when able- Specified by:
schema
in interfaceCortexConnectionStreamReader
- Returns:
- this instance
-
-