Github user zsxwing commented on a diff in the pull request: https://github.com/apache/spark/pull/11030#discussion_r51660438 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/ContinuousQuery.scala --- @@ -17,11 +17,45 @@ package org.apache.spark.sql +import org.apache.spark.annotation.Experimental + /** + * :: Experimental :: * A handle to a query that is executing continuously in the background as new data arrives. + * @since 2.0.0 */ +@Experimental trait ContinuousQuery { + /** Returns the name of the query */ + def name: String + + def sqlContext: SQLContext + + /** Whether the query is currently active or not */ + def isActive: Boolean + + /** Returns the [[QueryException]] if the query was terminated by an exception. */ + def exception: Option[QueryException] + + /** Returns current status of all the sources. */ + def sourceStatuses: Array[SourceStatus] + + /** Returns current status of the sink. */ + def sinkStatus: SinkStatus + + /** + * Waits for the termination of this query, either by `stop` or by any exception. + * @throws QueryException, if the query terminated by an exception. + */ + def awaitTermination(): Unit + + /** + * Waits for the termination of this query, either by `stop` or by any exception. + * @throws QueryException, if the query terminated by an exception before `timeoutMs` milliseconds + */ + def awaitTermination(timeoutMs: Long): Boolean --- End diff -- doc for return value?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org