Skip to content

Commit fe03241

Browse files
committed
[SPARK-20844] Remove experimental from Structured Streaming APIs
1 parent 4be3375 commit fe03241

File tree

13 files changed

+11
-55
lines changed

13 files changed

+11
-55
lines changed

docs/structured-streaming-programming-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: Structured Streaming Programming Guide
1010
# Overview
1111
Structured Streaming is a scalable and fault-tolerant stream processing engine built on the Spark SQL engine. You can express your streaming computation the same way you would express a batch computation on static data. The Spark SQL engine will take care of running it incrementally and continuously and updating the final result as streaming data continues to arrive. You can use the [Dataset/DataFrame API](sql-programming-guide.html) in Scala, Java, Python or R to express streaming aggregations, event-time windows, stream-to-batch joins, etc. The computation is executed on the same optimized Spark SQL engine. Finally, the system ensures end-to-end exactly-once fault-tolerance guarantees through checkpointing and Write Ahead Logs. In short, *Structured Streaming provides fast, scalable, fault-tolerant, end-to-end exactly-once stream processing without the user having to reason about streaming.*
1212

13-
**Structured Streaming is still ALPHA in Spark 2.1** and the APIs are still experimental. In this guide, we are going to walk you through the programming model and the APIs. First, let's start with a simple example - a streaming word count.
13+
In this guide, we are going to walk you through the programming model and the APIs. First, let's start with a simple example - a streaming word count.
1414

1515
# Quick Example
1616
Let’s say you want to maintain a running word count of text data received from a data server listening on a TCP socket. Let’s see how you can express this using Structured Streaming. You can see the full code in

sql/core/src/main/java/org/apache/spark/sql/streaming/Trigger.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@
2121

2222
import scala.concurrent.duration.Duration;
2323

24-
import org.apache.spark.annotation.Experimental;
2524
import org.apache.spark.annotation.InterfaceStability;
2625
import org.apache.spark.sql.execution.streaming.OneTimeTrigger$;
2726

2827
/**
29-
* :: Experimental ::
3028
* Policy used to indicate how often results should be produced by a [[StreamingQuery]].
3129
*
3230
* @since 2.0.0
3331
*/
34-
@Experimental
3532
@InterfaceStability.Evolving
3633
public class Trigger {
3734

sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,13 +2782,11 @@ class Dataset[T] private[sql](
27822782
}
27832783

27842784
/**
2785-
* :: Experimental ::
27862785
* Interface for saving the content of the streaming Dataset out into external storage.
27872786
*
27882787
* @group basic
27892788
* @since 2.0.0
27902789
*/
2791-
@Experimental
27922790
@InterfaceStability.Evolving
27932791
def writeStream: DataStreamWriter[T] = {
27942792
if (!isStreaming) {

sql/core/src/main/scala/org/apache/spark/sql/ForeachWriter.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717

1818
package org.apache.spark.sql
1919

20-
import org.apache.spark.annotation.{Experimental, InterfaceStability}
20+
import org.apache.spark.annotation.InterfaceStability
2121

2222
/**
23-
* :: Experimental ::
2423
* A class to consume data generated by a `StreamingQuery`. Typically this is used to send the
2524
* generated data to external systems. Each partition will use a new deserialized instance, so you
2625
* usually should do all the initialization (e.g. opening a connection or initiating a transaction)
@@ -66,7 +65,6 @@ import org.apache.spark.annotation.{Experimental, InterfaceStability}
6665
* }}}
6766
* @since 2.0.0
6867
*/
69-
@Experimental
7068
@InterfaceStability.Evolving
7169
abstract class ForeachWriter[T] extends Serializable {
7270

sql/core/src/main/scala/org/apache/spark/sql/functions.scala

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import scala.reflect.runtime.universe.{typeTag, TypeTag}
2323
import scala.util.Try
2424
import scala.util.control.NonFatal
2525

26-
import org.apache.spark.annotation.{Experimental, InterfaceStability}
26+
import org.apache.spark.annotation.InterfaceStability
2727
import org.apache.spark.sql.catalyst.ScalaReflection
2828
import org.apache.spark.sql.catalyst.analysis.{Star, UnresolvedFunction}
2929
import org.apache.spark.sql.catalyst.encoders.ExpressionEncoder
@@ -2800,8 +2800,6 @@ object functions {
28002800
* @group datetime_funcs
28012801
* @since 2.0.0
28022802
*/
2803-
@Experimental
2804-
@InterfaceStability.Evolving
28052803
def window(
28062804
timeColumn: Column,
28072805
windowDuration: String,
@@ -2854,8 +2852,6 @@ object functions {
28542852
* @group datetime_funcs
28552853
* @since 2.0.0
28562854
*/
2857-
@Experimental
2858-
@InterfaceStability.Evolving
28592855
def window(timeColumn: Column, windowDuration: String, slideDuration: String): Column = {
28602856
window(timeColumn, windowDuration, slideDuration, "0 second")
28612857
}
@@ -2893,8 +2889,6 @@ object functions {
28932889
* @group datetime_funcs
28942890
* @since 2.0.0
28952891
*/
2896-
@Experimental
2897-
@InterfaceStability.Evolving
28982892
def window(timeColumn: Column, windowDuration: String): Column = {
28992893
window(timeColumn, windowDuration, windowDuration, "0 second")
29002894
}

sql/core/src/main/scala/org/apache/spark/sql/streaming/DataStreamReader.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import org.apache.spark.sql.types.StructType
3535
*
3636
* @since 2.0.0
3737
*/
38-
@Experimental
3938
@InterfaceStability.Evolving
4039
final class DataStreamReader private[sql](sparkSession: SparkSession) extends Logging {
4140
/**

sql/core/src/main/scala/org/apache/spark/sql/streaming/DataStreamWriter.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@ import java.util.Locale
2121

2222
import scala.collection.JavaConverters._
2323

24-
import org.apache.spark.annotation.{Experimental, InterfaceStability}
24+
import org.apache.spark.annotation.InterfaceStability
2525
import org.apache.spark.sql.{AnalysisException, Dataset, ForeachWriter}
2626
import org.apache.spark.sql.catalyst.streaming.InternalOutputModes
2727
import org.apache.spark.sql.execution.command.DDLUtils
2828
import org.apache.spark.sql.execution.datasources.DataSource
2929
import org.apache.spark.sql.execution.streaming.{ForeachSink, MemoryPlan, MemorySink}
3030

3131
/**
32-
* :: Experimental ::
3332
* Interface used to write a streaming `Dataset` to external storage systems (e.g. file systems,
3433
* key-value stores, etc). Use `Dataset.writeStream` to access this.
3534
*
3635
* @since 2.0.0
3736
*/
38-
@Experimental
3937
@InterfaceStability.Evolving
4038
final class DataStreamWriter[T] private[sql](ds: Dataset[T]) {
4139

sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQuery.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ package org.apache.spark.sql.streaming
1919

2020
import java.util.UUID
2121

22-
import org.apache.spark.annotation.{Experimental, InterfaceStability}
22+
import org.apache.spark.annotation.InterfaceStability
2323
import org.apache.spark.sql.SparkSession
2424

2525
/**
26-
* :: Experimental ::
2726
* A handle to a query that is executing continuously in the background as new data arrives.
2827
* All these methods are thread-safe.
2928
* @since 2.0.0
3029
*/
31-
@Experimental
3230
@InterfaceStability.Evolving
3331
trait StreamingQuery {
3432

sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryException.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717

1818
package org.apache.spark.sql.streaming
1919

20-
import org.apache.spark.annotation.{Experimental, InterfaceStability}
20+
import org.apache.spark.annotation.InterfaceStability
2121

2222
/**
23-
* :: Experimental ::
2423
* Exception that stopped a [[StreamingQuery]]. Use `cause` get the actual exception
2524
* that caused the failure.
2625
* @param message Message of this exception
@@ -29,7 +28,6 @@ import org.apache.spark.annotation.{Experimental, InterfaceStability}
2928
* @param endOffset Ending offset in json of the range of data in exception occurred
3029
* @since 2.0.0
3130
*/
32-
@Experimental
3331
@InterfaceStability.Evolving
3432
class StreamingQueryException private[sql](
3533
private val queryDebugString: String,

sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryListener.scala

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@ package org.apache.spark.sql.streaming
1919

2020
import java.util.UUID
2121

22-
import org.apache.spark.annotation.{Experimental, InterfaceStability}
22+
import org.apache.spark.annotation.InterfaceStability
2323
import org.apache.spark.scheduler.SparkListenerEvent
2424

2525
/**
26-
* :: Experimental ::
2726
* Interface for listening to events related to [[StreamingQuery StreamingQueries]].
2827
* @note The methods are not thread-safe as they may be called from different threads.
2928
*
3029
* @since 2.0.0
3130
*/
32-
@Experimental
3331
@InterfaceStability.Evolving
3432
abstract class StreamingQueryListener {
3533

@@ -66,50 +64,41 @@ abstract class StreamingQueryListener {
6664

6765

6866
/**
69-
* :: Experimental ::
7067
* Companion object of [[StreamingQueryListener]] that defines the listener events.
7168
* @since 2.0.0
7269
*/
73-
@Experimental
7470
@InterfaceStability.Evolving
7571
object StreamingQueryListener {
7672

7773
/**
78-
* :: Experimental ::
7974
* Base type of [[StreamingQueryListener]] events
8075
* @since 2.0.0
8176
*/
82-
@Experimental
8377
@InterfaceStability.Evolving
8478
trait Event extends SparkListenerEvent
8579

8680
/**
87-
* :: Experimental ::
8881
* Event representing the start of a query
8982
* @param id An unique query id that persists across restarts. See `StreamingQuery.id()`.
9083
* @param runId A query id that is unique for every start/restart. See `StreamingQuery.runId()`.
9184
* @param name User-specified name of the query, null if not specified.
9285
* @since 2.1.0
9386
*/
94-
@Experimental
9587
@InterfaceStability.Evolving
9688
class QueryStartedEvent private[sql](
9789
val id: UUID,
9890
val runId: UUID,
9991
val name: String) extends Event
10092

10193
/**
102-
* :: Experimental ::
10394
* Event representing any progress updates in a query.
10495
* @param progress The query progress updates.
10596
* @since 2.1.0
10697
*/
107-
@Experimental
10898
@InterfaceStability.Evolving
10999
class QueryProgressEvent private[sql](val progress: StreamingQueryProgress) extends Event
110100

111101
/**
112-
* :: Experimental ::
113102
* Event representing that termination of a query.
114103
*
115104
* @param id An unique query id that persists across restarts. See `StreamingQuery.id()`.
@@ -118,7 +107,6 @@ object StreamingQueryListener {
118107
* with an exception. Otherwise, it will be `None`.
119108
* @since 2.1.0
120109
*/
121-
@Experimental
122110
@InterfaceStability.Evolving
123111
class QueryTerminatedEvent private[sql](
124112
val id: UUID,

0 commit comments

Comments
 (0)