Class DefaultCortexConnectionStreamReader
- java.lang.Object
-
- com.c12e.cortex.profiles.module.connection.DefaultCortexConnectionStreamReader
-
- All Implemented Interfaces:
CortexConnectionStreamReaderModule
,CortexModule<CortexConnectionStreamReader>
public class DefaultCortexConnectionStreamReader extends java.lang.Object implements CortexConnectionStreamReaderModule
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DefaultCortexConnectionStreamReader.CortexReadStreamParameters
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultCortexConnectionStreamReader(CortexContext cortexContext, com.c12e.cortex.phoenix.Catalog catalog, CortexValidator cortexValidator, CortexSecretsClient cortexSecretsClient, PhoenixRemoteStorage phoenixRemoteStorage, CortexConnectionReaderModule cortexConnectionReaderModule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeOldFileSystem(java.util.Map<java.lang.String,java.lang.String> options)
CortexConnectionStreamReader
getBuilder()
Create module specific builderprotected com.c12e.cortex.phoenix.Connection
getConnection(DefaultCortexConnectionStreamReader.CortexReadStreamParameters readParameters)
protected void
handleGCPFileStreamConnection(java.util.Map<java.lang.String,java.lang.String> options)
protected void
handleOther(java.util.Map<java.lang.String,java.lang.String> options)
protected void
handleS3FileStreamConnection(java.util.Map<java.lang.String,java.lang.String> options)
CortexDataSourcePair
read(DefaultCortexConnectionStreamReader.CortexReadStreamParameters cortexStreamReadParameters)
Read from a Cortex Connection using the builder instance Create a static DataFrame based on the uri param Create a streaming DataFrame based on the stream_read_dir parmprotected CortexDataSourcePair
readStreamFromConnection(DefaultCortexConnectionStreamReader.CortexReadStreamParameters readStreamParameters)
protected void
validateConnection(DefaultCortexConnectionStreamReader.CortexReadStreamParameters cortexStreamReadParameters)
-
-
-
Constructor Detail
-
DefaultCortexConnectionStreamReader
@Inject protected DefaultCortexConnectionStreamReader(CortexContext cortexContext, com.c12e.cortex.phoenix.Catalog catalog, CortexValidator cortexValidator, CortexSecretsClient cortexSecretsClient, PhoenixRemoteStorage phoenixRemoteStorage, CortexConnectionReaderModule cortexConnectionReaderModule)
-
-
Method Detail
-
getBuilder
public CortexConnectionStreamReader getBuilder()
Description copied from interface:CortexModule
Create module specific builder- Specified by:
getBuilder
in interfaceCortexModule<CortexConnectionStreamReader>
- Returns:
- builder instance
-
getConnection
protected com.c12e.cortex.phoenix.Connection getConnection(DefaultCortexConnectionStreamReader.CortexReadStreamParameters readParameters)
-
validateConnection
protected void validateConnection(DefaultCortexConnectionStreamReader.CortexReadStreamParameters cortexStreamReadParameters)
-
closeOldFileSystem
protected void closeOldFileSystem(java.util.Map<java.lang.String,java.lang.String> options)
-
handleS3FileStreamConnection
protected void handleS3FileStreamConnection(java.util.Map<java.lang.String,java.lang.String> options)
-
handleGCPFileStreamConnection
protected void handleGCPFileStreamConnection(java.util.Map<java.lang.String,java.lang.String> options)
-
handleOther
protected void handleOther(java.util.Map<java.lang.String,java.lang.String> options)
-
readStreamFromConnection
protected CortexDataSourcePair readStreamFromConnection(DefaultCortexConnectionStreamReader.CortexReadStreamParameters readStreamParameters)
-
read
public CortexDataSourcePair read(DefaultCortexConnectionStreamReader.CortexReadStreamParameters cortexStreamReadParameters)
Read from a Cortex Connection using the builder instance Create a static DataFrame based on the uri param Create a streaming DataFrame based on the stream_read_dir parm- Parameters:
cortexStreamReadParameters
- builder instance- Returns:
- the read static and stream DataFrame
-
-