Github user lw-lin commented on a diff in the pull request: https://github.com/apache/spark/pull/16442#discussion_r94271296 --- Diff: docs/structured-streaming-programming-guide.md --- @@ -1491,14 +1503,17 @@ spark.streams.addListener(new StreamingQueryListener() { {% highlight java %} SparkSession spark = ... -spark.streams.addListener(new StreamingQueryListener() { - @Overrides void onQueryStarted(QueryStartedEvent queryStarted) { +spark.streams().addListener(new StreamingQueryListener() { + @Override + public void onQueryStarted(QueryStartedEvent queryStarted) { System.out.println("Query started: " + queryStarted.id()); } - @Overrides void onQueryTerminated(QueryTerminatedEvent queryTerminated) { + @Override + public void onQueryTerminated(QueryTerminatedEvent queryTerminated) { System.out.println("Query terminated: " + queryTerminated.id()); } - @Overrides void onQueryProgress(QueryProgressEvent queryProgress) { + @Override + public void onQueryProgress(QueryProgressEvent queryProgress) { --- End diff -- It's `@Override` in java, and these methods must be public
--- 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