@@ -221,51 +221,6 @@ object KinesisUtils {
221
221
}
222
222
}
223
223
224
- /**
225
- * Create an input stream that pulls messages from a Kinesis stream.
226
- * This uses the Kinesis Client Library (KCL) to pull messages from Kinesis.
227
- *
228
- * Note:
229
- *
230
- * - The AWS credentials will be discovered using the DefaultAWSCredentialsProviderChain
231
- * on the workers. See AWS documentation to understand how DefaultAWSCredentialsProviderChain
232
- * gets AWS credentials.
233
- * - The region of the `endpointUrl` will be used for DynamoDB and CloudWatch.
234
- * - The Kinesis application name used by the Kinesis Client Library (KCL) will be the app name
235
- * in [[org.apache.spark.SparkConf ]].
236
- *
237
- * @param ssc StreamingContext object
238
- * @param streamName Kinesis stream name
239
- * @param endpointUrl Endpoint url of Kinesis service
240
- * (e.g., https://kinesis.us-east-1.amazonaws.com)
241
- * @param checkpointInterval Checkpoint interval for Kinesis checkpointing.
242
- * See the Kinesis Spark Streaming documentation for more
243
- * details on the different types of checkpoints.
244
- * @param initialPositionInStream In the absence of Kinesis checkpoint info, this is the
245
- * worker's initial starting position in the stream.
246
- * The values are either the beginning of the stream
247
- * per Kinesis' limit of 24 hours
248
- * (InitialPositionInStream.TRIM_HORIZON) or
249
- * the tip of the stream (InitialPositionInStream.LATEST).
250
- * @param storageLevel Storage level to use for storing the received objects
251
- * StorageLevel.MEMORY_AND_DISK_2 is recommended.
252
- */
253
- @ deprecated(" use other forms of createStream" , " 1.4.0" )
254
- def createStream (
255
- ssc : StreamingContext ,
256
- streamName : String ,
257
- endpointUrl : String ,
258
- checkpointInterval : Duration ,
259
- initialPositionInStream : InitialPositionInStream ,
260
- storageLevel : StorageLevel
261
- ): ReceiverInputDStream [Array [Byte ]] = {
262
- ssc.withNamedScope(" kinesis stream" ) {
263
- new KinesisInputDStream [Array [Byte ]](ssc, streamName, endpointUrl,
264
- getRegionByEndpoint(endpointUrl), initialPositionInStream, ssc.sc.appName,
265
- checkpointInterval, storageLevel, defaultMessageHandler, None )
266
- }
267
- }
268
-
269
224
/**
270
225
* Create an input stream that pulls messages from a Kinesis stream.
271
226
* This uses the Kinesis Client Library (KCL) to pull messages from Kinesis.
@@ -453,47 +408,6 @@ object KinesisUtils {
453
408
defaultMessageHandler(_), awsAccessKeyId, awsSecretKey)
454
409
}
455
410
456
- /**
457
- * Create an input stream that pulls messages from a Kinesis stream.
458
- * This uses the Kinesis Client Library (KCL) to pull messages from Kinesis.
459
- *
460
- * Note:
461
- * - The AWS credentials will be discovered using the DefaultAWSCredentialsProviderChain
462
- * on the workers. See AWS documentation to understand how DefaultAWSCredentialsProviderChain
463
- * gets AWS credentials.
464
- * - The region of the `endpointUrl` will be used for DynamoDB and CloudWatch.
465
- * - The Kinesis application name used by the Kinesis Client Library (KCL) will be the app name in
466
- * [[org.apache.spark.SparkConf ]].
467
- *
468
- * @param jssc Java StreamingContext object
469
- * @param streamName Kinesis stream name
470
- * @param endpointUrl Endpoint url of Kinesis service
471
- * (e.g., https://kinesis.us-east-1.amazonaws.com)
472
- * @param checkpointInterval Checkpoint interval for Kinesis checkpointing.
473
- * See the Kinesis Spark Streaming documentation for more
474
- * details on the different types of checkpoints.
475
- * @param initialPositionInStream In the absence of Kinesis checkpoint info, this is the
476
- * worker's initial starting position in the stream.
477
- * The values are either the beginning of the stream
478
- * per Kinesis' limit of 24 hours
479
- * (InitialPositionInStream.TRIM_HORIZON) or
480
- * the tip of the stream (InitialPositionInStream.LATEST).
481
- * @param storageLevel Storage level to use for storing the received objects
482
- * StorageLevel.MEMORY_AND_DISK_2 is recommended.
483
- */
484
- @ deprecated(" use other forms of createStream" , " 1.4.0" )
485
- def createStream (
486
- jssc : JavaStreamingContext ,
487
- streamName : String ,
488
- endpointUrl : String ,
489
- checkpointInterval : Duration ,
490
- initialPositionInStream : InitialPositionInStream ,
491
- storageLevel : StorageLevel
492
- ): JavaReceiverInputDStream [Array [Byte ]] = {
493
- createStream(
494
- jssc.ssc, streamName, endpointUrl, checkpointInterval, initialPositionInStream, storageLevel)
495
- }
496
-
497
411
private def getRegionByEndpoint (endpointUrl : String ): String = {
498
412
RegionUtils .getRegionByEndpoint(endpointUrl).getName()
499
413
}
0 commit comments