From 303c247e4604098518acaa2d8ebe63fc891706f0 Mon Sep 17 00:00:00 2001 From: "Sean R. Owen" Date: Wed, 3 Jun 2015 17:14:40 +0000 Subject: Fix two Java example typos --- site/examples.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'site') diff --git a/site/examples.html b/site/examples.html index de491f2a8..c7a4f0cb7 100644 --- a/site/examples.html +++ b/site/examples.html @@ -297,7 +297,7 @@ previous ones, and actions, which kick off a job to execute on a cluste 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, which kick off a job to execute on a cluste
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;
-- cgit v1.2.3