Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11030#discussion_r52212645
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/ContinuousQuery.scala ---
    @@ -17,11 +17,47 @@
     
     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 [[ContinuousQueryException]] if the query was terminated 
by an exception. */
    +  def exception: Option[ContinuousQueryException]
    +
    +  /** 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 ContinuousQueryException, if the query terminated by an 
exception.
    +   */
    +  def awaitTermination(): Unit
    +
    +  /**
    +   * Waits for the termination of this query, either by `stop` or by any 
exception.
    +   * Returns whether the query has terminated or not.
    +   * @throws ContinuousQueryException, if the query terminated by an 
exception before
    +   *         `timeoutMs` milliseconds
    +   */
    +  def awaitTermination(timeoutMs: Long): Boolean
    +
       /**
        * Stops the execution of this query if it is running.  This method 
blocks until the threads
    --- End diff --
    
    I mentioned that all these methods are thread-safe in the class docs. And, 
stop is not expected to throw any exception. 


---
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

Reply via email to