You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2016/04/06 00:18:43 UTC
spark git commit: [SPARK-14411][SQL] Add a note to warn that
onQueryProgress is asynchronous
Repository: spark
Updated Branches:
refs/heads/master 45d8cdee3 -> 7329fe272
[SPARK-14411][SQL] Add a note to warn that onQueryProgress is asynchronous
## What changes were proposed in this pull request?
onQueryProgress is asynchronous so the user may see some future status of `ContinuousQuery`. This PR just updated comments to warn it.
## How was this patch tested?
Only updated comments.
Author: Shixiong Zhu <sh...@databricks.com>
Closes #12180 from zsxwing/ContinuousQueryListener-doc.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7329fe27
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7329fe27
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7329fe27
Branch: refs/heads/master
Commit: 7329fe272d3ead7db9bc3e1e32adb7329dabc607
Parents: 45d8cde
Author: Shixiong Zhu <sh...@databricks.com>
Authored: Tue Apr 5 15:18:35 2016 -0700
Committer: Michael Armbrust <mi...@databricks.com>
Committed: Tue Apr 5 15:18:35 2016 -0700
----------------------------------------------------------------------
.../apache/spark/sql/util/ContinuousQueryListener.scala | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/7329fe27/sql/core/src/main/scala/org/apache/spark/sql/util/ContinuousQueryListener.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/util/ContinuousQueryListener.scala b/sql/core/src/main/scala/org/apache/spark/sql/util/ContinuousQueryListener.scala
index 2c5358c..bf78be9 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/util/ContinuousQueryListener.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/util/ContinuousQueryListener.scala
@@ -34,11 +34,19 @@ abstract class ContinuousQueryListener {
* @note This is called synchronously with
* [[org.apache.spark.sql.DataFrameWriter `DataFrameWriter.startStream()`]],
* that is, `onQueryStart` will be called on all listeners before
- * `DataFrameWriter.startStream()` returns the corresponding [[ContinuousQuery]].
+ * `DataFrameWriter.startStream()` returns the corresponding [[ContinuousQuery]]. Please
+ * don't block this method as it will block your query.
*/
def onQueryStarted(queryStarted: QueryStarted)
- /** Called when there is some status update (ingestion rate updated, etc. */
+ /**
+ * Called when there is some status update (ingestion rate updated, etc.)
+ *
+ * @note This method is asynchronous. The status in [[ContinuousQuery]] will always be
+ * latest no matter when this method is called. Therefore, the status of [[ContinuousQuery]]
+ * may be changed before/when you process the event. E.g., you may find [[ContinuousQuery]]
+ * is terminated when you are processing [[QueryProgress]].
+ */
def onQueryProgress(queryProgress: QueryProgress)
/** Called when a query is stopped, with or without error */
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org