public class KinesisUtils
extends Object
Constructor and Description |
---|
KinesisUtils() |
Modifier and Type | Method and Description |
---|---|
static JavaReceiverInputDStream<byte[]> |
createStream(JavaStreamingContext jssc,
String streamName,
String endpointUrl,
Duration checkpointInterval,
com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionInStream initialPositionInStream,
StorageLevel storageLevel)
Create a Java-friendly InputDStream that pulls messages from a Kinesis stream.
|
static ReceiverInputDStream<byte[]> |
createStream(StreamingContext ssc,
String streamName,
String endpointUrl,
Duration checkpointInterval,
com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionInStream initialPositionInStream,
StorageLevel storageLevel)
Create an InputDStream that pulls messages from a Kinesis stream.
|
public static ReceiverInputDStream<byte[]> createStream(StreamingContext ssc, String streamName, String endpointUrl, Duration checkpointInterval, com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionInStream initialPositionInStream, StorageLevel storageLevel)
ssc
- StreamingContext objectstreamName
- Kinesis stream nameendpointUrl
- Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)checkpointInterval
- Checkpoint interval for Kinesis checkpointing.
See the Kinesis Spark Streaming documentation for more
details on the different types of checkpoints.initialPositionInStream
- In the absence of Kinesis checkpoint info, this is the
worker's initial starting position in the stream.
The values are either the beginning of the stream
per Kinesis' limit of 24 hours
(InitialPositionInStream.TRIM_HORIZON) or
the tip of the stream (InitialPositionInStream.LATEST).storageLevel
- Storage level to use for storing the received objects
public static JavaReceiverInputDStream<byte[]> createStream(JavaStreamingContext jssc, String streamName, String endpointUrl, Duration checkpointInterval, com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionInStream initialPositionInStream, StorageLevel storageLevel)
jssc
- Java StreamingContext objectstreamName
- Kinesis stream nameendpointUrl
- Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)checkpointInterval
- Checkpoint interval for Kinesis checkpointing.
See the Kinesis Spark Streaming documentation for more
details on the different types of checkpoints.initialPositionInStream
- In the absence of Kinesis checkpoint info, this is the
worker's initial starting position in the stream.
The values are either the beginning of the stream
per Kinesis' limit of 24 hours
(InitialPositionInStream.TRIM_HORIZON) or
the tip of the stream (InitialPositionInStream.LATEST).storageLevel
- Storage level to use for storing the received objects