Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/14564#discussion_r74036579
--- Diff:
examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCountWindowed.java
---
@@ -75,28 +75,30 @@ public static void main(String[] args) throws Exception
{
.getOrCreate();
// Create DataFrame representing the stream of input lines from
connection to host:port
- Dataset<Tuple2<String, Timestamp>> lines = spark
+ Dataset<Row> lines = spark
.readStream()
.format("socket")
.option("host", host)
.option("port", port)
.option("includeTimestamp", true)
- .load().as(Encoders.tuple(Encoders.STRING(), Encoders.TIMESTAMP()));
+ .load();
// Split the lines into words, retaining timestamps
- Dataset<Row> words = lines.flatMap(
--- End diff --
This diff looks a lot but the actual change is only
```java
- .load().as(Encoders.tuple(Encoders.STRING(), Encoders.TIMESTAMP()));
+ .load();
```
and
```java
- Dataset<Row> words = lines.flatMap(
+ Dataset<Row> words = lines
+ .as(Encoders.tuple(Encoders.STRING(), Encoders.TIMESTAMP()))
+ .flatMap(
```
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]