[
https://issues.apache.org/jira/browse/SPARK-7096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sean Owen resolved SPARK-7096.
------------------------------
Resolution: Duplicate
Assignee: (was: Reynold Xin)
Have a look at master in instances like this; sometimes it's already fixed.
> Java example for Streaming on site uses map instead of mapToPair
> ----------------------------------------------------------------
>
> Key: SPARK-7096
> URL: https://issues.apache.org/jira/browse/SPARK-7096
> Project: Spark
> Issue Type: Bug
> Components: Documentation, Java API
> Affects Versions: 1.3.1
> Environment: Web
> Reporter: Edward Sargisson
> Priority: Minor
>
> https://spark.apache.org/docs/latest/streaming-programming-guide.html
> Here word count example for java is incorrect. It should be mapToPair instead
> of map.
> Incorrect:
> {noformat}
> JavaPairDStream<String, Integer> pairs = words.map(
> new PairFunction<String, String, Integer>() {
> @Override public Tuple2<String, Integer> call(String s) throws Exception {
> return new Tuple2<String, Integer>(s, 1);
> }
> });
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]