Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB71E1742E for ; Thu, 23 Apr 2015 18:12:39 +0000 (UTC) Received: (qmail 64112 invoked by uid 500); 23 Apr 2015 18:12:39 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 63942 invoked by uid 500); 23 Apr 2015 18:12:39 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 63799 invoked by uid 99); 23 Apr 2015 18:12:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2015 18:12:39 +0000 Date: Thu, 23 Apr 2015 18:12:39 +0000 (UTC) From: "Edward Sargisson (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SPARK-7096) Java example for Streaming on site uses map instead of mapToPair MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-7096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Edward Sargisson updated SPARK-7096: ------------------------------------ Description: 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 pairs = words.map( new PairFunction() { @Override public Tuple2 call(String s) throws Exception { return new Tuple2(s, 1); } }); {noformat} was: https://spark.apache.org/examples.html Here word count example for java is incorrect. It should be mapToPair instead of map. Correct example is here: https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/JavaWordCount.java > 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 > Assignee: Reynold Xin > 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 pairs = words.map( > new PairFunction() { > @Override public Tuple2 call(String s) throws Exception { > return new Tuple2(s, 1); > } > }); > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org