Github user brkyvz commented on a diff in the pull request:
https://github.com/apache/spark/pull/18029#discussion_r144336164
--- Diff:
external/kinesis-asl/src/main/scala/org/apache/spark/streaming/kinesis/KinesisInputDStream.scala
---
@@ -182,14 +182,29 @@ object KinesisInputDStream {
/**
* Sets the initial position data is read from in the Kinesis stream.
Defaults to
+ * [[Latest]] if no custom value is specified.
+ *
+ * @param initialPosition [[InitialPosition]] value specifying where
Spark Streaming
+ * will start reading records in the Kinesis
stream from
+ * @return Reference to this [[KinesisInputDStream.Builder]]
+ */
+ def initialPosition(initialPosition: InitialPosition): Builder = {
+ this.initialPosition = Option(initialPosition)
+ this
+ }
+
+ /**
+ * Sets the initial position data is read from in the Kinesis stream.
Defaults to
* [[InitialPositionInStream.LATEST]] if no custom value is specified.
+ * This function would be removed when we deprecate the KinesisUtils.
*
* @param initialPosition InitialPositionInStream value specifying
where Spark Streaming
* will start reading records in the Kinesis
stream from
* @return Reference to this [[KinesisInputDStream.Builder]]
*/
+ @deprecated("use initialPosition(initialPosition: InitialPosition)",
"2.0.0")
--- End diff --
2.3.0
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]