118119120121122123124125
List<Tuple2<String, Double>> output = ranks.collect(); for (Tuple2<?,?> tuple : output) { System.out.println(tuple._1() + " has rank: " + tuple._2() + "."); } ctx.stop(); } }
5960616263646566
} }); System.out.println("Pi is roughly " + 4.0 * count / n); jsc.stop(); } }
6768697071727374
List<Tuple2<String, Integer>> output = counts.collect(); for (Tuple2<?,?> tuple : output) { System.out.println(tuple._1() + ": " + tuple._2()); } ctx.stop(); } }
137138139140141142143144
} System.out.print("Final w: "); printWeights(w); sc.stop(); } }
9293949596979899
tc = tc.union(tc.join(edges).mapToPair(ProjectFn.INSTANCE)).distinct().cache(); nextCount = tc.count(); } while (nextCount != oldCount); System.out.println("TC has " + tc.count() + " edges."); sc.stop(); } }
6364656667686970
System.out.println(stageInfo.numTasks() + " tasks total: " + stageInfo.numActiveTasks() + " active, " + stageInfo.numCompletedTasks() + " complete"); } System.out.println("Job results are: " + jobFuture.get()); sc.stop(); } }
122123124125126127128129
List<Tuple2<Tuple3<String, String, String>, Stats>> output = counts.collect(); for (Tuple2<?,?> t : output) { System.out.println(t._1() + "\t" + t._2()); } jsc.stop(); } }
173174175176177178179180
}).collect(); for (String name: nameAndCity) { System.out.println(name); } ctx.stop(); } }
109110111112113114115116
} }) / data.count(); System.out.println("Training Mean Squared Error: " + trainMSE); System.out.println("Learned regression tree model:\n" + regressionModel); sc.stop(); } }
8384858687888990
outputDir + "/userFeatures"); model.productFeatures().toJavaRDD().map(new FeaturesToString()).saveAsTextFile( outputDir + "/productFeatures"); System.out.println("Final user/product features written to " + outputDir); sc.stop(); } }