Skip to content

Commit 0e58fee

Browse files
brandonJYsrowen
authored andcommitted
[DOCS] change to dataset for java code in structured-streaming-kafka-integration document
## What changes were proposed in this pull request? In latest structured-streaming-kafka-integration document, Java code example for Kafka integration is using `DataFrame<Row>`, shouldn't it be changed to `DataSet<Row>`? ## How was this patch tested? manual test has been performed to test the updated example Java code in Spark 2.2.1 with Kafka 1.0 Author: brandonJY <[email protected]> Closes #20312 from brandonJY/patch-2. (cherry picked from commit 6121e91) Signed-off-by: Sean Owen <[email protected]>
1 parent d09eecc commit 0e58fee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/structured-streaming-kafka-integration.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ df.selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)")
5959
{% highlight java %}
6060

6161
// Subscribe to 1 topic
62-
DataFrame<Row> df = spark
62+
Dataset<Row> df = spark
6363
.readStream()
6464
.format("kafka")
6565
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")
@@ -68,7 +68,7 @@ DataFrame<Row> df = spark
6868
df.selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)")
6969

7070
// Subscribe to multiple topics
71-
DataFrame<Row> df = spark
71+
Dataset<Row> df = spark
7272
.readStream()
7373
.format("kafka")
7474
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")
@@ -77,7 +77,7 @@ DataFrame<Row> df = spark
7777
df.selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)")
7878

7979
// Subscribe to a pattern
80-
DataFrame<Row> df = spark
80+
Dataset<Row> df = spark
8181
.readStream()
8282
.format("kafka")
8383
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")
@@ -169,7 +169,7 @@ df.selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)")
169169
{% highlight java %}
170170

171171
// Subscribe to 1 topic defaults to the earliest and latest offsets
172-
DataFrame<Row> df = spark
172+
Dataset<Row> df = spark
173173
.read()
174174
.format("kafka")
175175
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")
@@ -178,7 +178,7 @@ DataFrame<Row> df = spark
178178
df.selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)");
179179

180180
// Subscribe to multiple topics, specifying explicit Kafka offsets
181-
DataFrame<Row> df = spark
181+
Dataset<Row> df = spark
182182
.read()
183183
.format("kafka")
184184
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")
@@ -189,7 +189,7 @@ DataFrame<Row> df = spark
189189
df.selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)");
190190

191191
// Subscribe to a pattern, at the earliest and latest offsets
192-
DataFrame<Row> df = spark
192+
Dataset<Row> df = spark
193193
.read()
194194
.format("kafka")
195195
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")

0 commit comments

Comments
 (0)