-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-18461][DOCS][StructuredStreaming] Added more information about monitoring streaming queries #15897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #68686 has finished for PR 15897 at commit
|
|
Test build #68687 has finished for PR 15897 at commit
|
|
Thanks, merging to master and 2.1. |
… monitoring streaming queries ## What changes were proposed in this pull request? <img width="941" alt="screen shot 2016-11-15 at 6 27 32 pm" src="https://cloud.githubusercontent.com/assets/663212/20332521/4190b858-ab61-11e6-93a6-4bdc05105ed9.png"> <img width="940" alt="screen shot 2016-11-15 at 6 27 45 pm" src="https://cloud.githubusercontent.com/assets/663212/20332525/44a0d01e-ab61-11e6-8668-47f925490d4f.png"> Author: Tathagata Das <tathagata.das1565@gmail.com> Closes #15897 from tdas/SPARK-18461. (cherry picked from commit bb6cdfd) Signed-off-by: Michael Armbrust <michael@databricks.com>
| {% highlight java %} | ||
| StreamingQuery query = ... | ||
|
|
||
| System.out.println(query.status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: query.status()
| {% highlight python %} | ||
| query = ... // a StreamingQuery | ||
|
|
||
| print(query.status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no status method in Python now... We need to add it.
| spark.streams.addListener(new StreamingQueryListener() { | ||
|
|
||
| @Overrides void onQueryStarted(QueryStartedEvent queryStarted) { | ||
| System.out.println("Query started: " + queryTerminated.queryStatus.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: queryTerminated.queryStatus.name -> queryTerminated.queryStatus().name()
| System.out.println("Query started: " + queryTerminated.queryStatus.name); | ||
| } | ||
| @Overrides void onQueryTerminated(QueryTerminatedEvent queryTerminated) { | ||
| System.out.println("Query terminated: " + queryTerminated.queryStatus.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: queryTerminated.queryStatus.name -> queryTerminated.queryStatus().name()
| System.out.println("Query terminated: " + queryTerminated.queryStatus.name); | ||
| } | ||
| @Overrides void onQueryProgress(QueryProgressEvent queryProgress) { | ||
| System.out.println("Query made progress: " + queryProgress.queryStatus); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: queryTerminated.queryStatus.name -> queryTerminated.queryStatus().name()
|
|
||
| spark.streams.addListener(new StreamingQueryListener() { | ||
|
|
||
| @Overrides void onQueryStarted(QueryStartedEvent queryStarted) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: @ Overrides -> @Override
| @Overrides void onQueryStarted(QueryStartedEvent queryStarted) { | ||
| System.out.println("Query started: " + queryTerminated.queryStatus.name); | ||
| } | ||
| @Overrides void onQueryTerminated(QueryTerminatedEvent queryTerminated) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: @ Overrides -> @Override
| @Overrides void onQueryTerminated(QueryTerminatedEvent queryTerminated) { | ||
| System.out.println("Query terminated: " + queryTerminated.queryStatus.name); | ||
| } | ||
| @Overrides void onQueryProgress(QueryProgressEvent queryProgress) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: @ Overrides -> @Override
| {% highlight java %} | ||
| SparkSession spark = ... | ||
|
|
||
| spark.streams.addListener(new StreamingQueryListener() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spark.streams -> spark.streams()
|
I am making a PR to add status to python. I will fix these doc stuff in that. |
… monitoring streaming queries ## What changes were proposed in this pull request? <img width="941" alt="screen shot 2016-11-15 at 6 27 32 pm" src="https://cloud.githubusercontent.com/assets/663212/20332521/4190b858-ab61-11e6-93a6-4bdc05105ed9.png"> <img width="940" alt="screen shot 2016-11-15 at 6 27 45 pm" src="https://cloud.githubusercontent.com/assets/663212/20332525/44a0d01e-ab61-11e6-8668-47f925490d4f.png"> Author: Tathagata Das <tathagata.das1565@gmail.com> Closes apache#15897 from tdas/SPARK-18461.
What changes were proposed in this pull request?