Skip to content

Commit

Permalink
[MINOR][DOCS] Fix ForEachWriter Java example
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Structured streaming documentation example fix

### Why are the changes needed?
Currently the java example uses incorrect syntax

### Does this PR introduce any user-facing change?
Yes

### How was this patch tested?
In IDE

Closes #27671 from roland1982/foreachwriter_java_example_fix.

Authored-by: roland-ondeviceresearch <roland@ondeviceresearch.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
  • Loading branch information
roland-ondeviceresearch authored and HyukjinKwon committed Feb 22, 2020
1 parent 1b793ed commit 8fdd039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/structured-streaming-programming-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2156,7 +2156,7 @@ streamingDatasetOfString.writeStream.foreach(
In Java, you have to extend the class `ForeachWriter` ([docs](api/java/org/apache/spark/sql/ForeachWriter.html)).
{% highlight java %}
streamingDatasetOfString.writeStream().foreach(
new ForeachWriter[String] {
new ForeachWriter<String>() {

@Override public boolean open(long partitionId, long version) {
// Open connection
Expand Down

0 comments on commit 8fdd039

Please sign in to comment.