Return-Path: X-Original-To: apmail-spark-commits-archive@minotaur.apache.org Delivered-To: apmail-spark-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A869D18781 for ; Wed, 3 Jun 2015 17:14:41 +0000 (UTC) Received: (qmail 81956 invoked by uid 500); 3 Jun 2015 17:14:41 -0000 Delivered-To: apmail-spark-commits-archive@spark.apache.org Received: (qmail 81933 invoked by uid 500); 3 Jun 2015 17:14:41 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 81924 invoked by uid 99); 3 Jun 2015 17:14:41 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2015 17:14:41 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 51846AC054F for ; Wed, 3 Jun 2015 17:14:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1683391 - in /spark: examples.md site/examples.html Date: Wed, 03 Jun 2015 17:14:41 -0000 To: commits@spark.apache.org From: srowen@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150603171441.51846AC054F@hades.apache.org> Author: srowen Date: Wed Jun 3 17:14:40 2015 New Revision: 1683391 URL: http://svn.apache.org/r1683391 Log: Fix two Java example typos Modified: spark/examples.md spark/site/examples.html Modified: spark/examples.md URL: http://svn.apache.org/viewvc/spark/examples.md?rev=1683391&r1=1683390&r2=1683391&view=diff ============================================================================== --- spark/examples.md (original) +++ spark/examples.md Wed Jun 3 17:14:40 2015 @@ -137,7 +137,7 @@ In this example, we search through the e JavaPairRDD<String, Integer> pairs = words.mapToPair(new PairFunction<String, String, Integer>() {
  public Tuple2<String, Integer> call(String s) { return new Tuple2<String, Integer>(s, 1); }
}
);
- JavaPairRDD<String, Integer> counts = pairs.reduceByKey(new Function2<Integer, Integer>() {
+ JavaPairRDD<String, Integer> counts = pairs.reduceByKey(new Function2<Integer, Integer, Integer>() {
  public Integer call(Integer a, Integer b) { return a + b; }
}
);
counts.saveAsTextFile("hdfs://..."); @@ -178,7 +178,7 @@ In this example, we search through the e
int count = spark.parallelize(makeRange(1, NUM_SAMPLES)).filter(new Function<Integer, Boolean>() {
-   public Integer call(Integer i) {
+   public Boolean call(Integer i) {
    double x = Math.random();
    double y = Math.random();
    return x*x + y*y < 1;
Modified: spark/site/examples.html URL: http://svn.apache.org/viewvc/spark/site/examples.html?rev=1683391&r1=1683390&r2=1683391&view=diff ============================================================================== --- spark/site/examples.html (original) +++ spark/site/examples.html Wed Jun 3 17:14:40 2015 @@ -297,7 +297,7 @@ previous ones, and actions, whi JavaPairRDD<String, Integer> pairs = words.mapToPair(new PairFunction<String, String, Integer>() {
  public Tuple2<String, Integer> call(String s) { return new Tuple2<String, Integer>(s, 1); }
}
);
- JavaPairRDD<String, Integer> counts = pairs.reduceByKey(new Function2<Integer, Integer>() {
+ JavaPairRDD<String, Integer> counts = pairs.reduceByKey(new Function2<Integer, Integer, Integer>() {
  public Integer call(Integer a, Integer b) { return a + b; }
}
);
counts.saveAsTextFile("hdfs://..."); @@ -338,7 +338,7 @@ previous ones, and actions, whi
int count = spark.parallelize(makeRange(1, NUM_SAMPLES)).filter(new Function<Integer, Boolean>() {
-   public Integer call(Integer i) {
+   public Boolean call(Integer i) {
    double x = Math.random();
    double y = Math.random();
    return x*x + y*y < 1;
--------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org