Re: JavaNetworkWordCount

2014-05-16 Thread Mayur Rustagi
It would look ugly.. as explicit datatypes need to be mentioned.. you are better off using parallelize instead. Mayur Rustagi Ph: +1 (760) 203 3257 http://www.sigmoidanalytics.com @mayur_rustagi On Fri, May 16, 2014 at 6:11 PM, Eduardo Costa Alfaia < e.costaa

JavaNetworkWordCount

2014-05-16 Thread Eduardo Costa Alfaia
Hi Guys, TD has given me this piece of code: “sparkContext.makeRDD(1 to 100, 100).collect()", I am using a java code of NetworkWordcount, How could I use this piece in this code in java? Thanks -- Informativa sulla Privacy: http://www.unibs.it/node/8155

Print line in JavaNetworkWordCount

2014-04-02 Thread Eduardo Costa Alfaia
Hi Guys I would like printing the content inside of line in : JavaDStream lines = ssc.socketTextStream(args[1], Integer.parseInt(args[2])); JavaDStream words = lines.flatMap(new FlatMapFunction() { @Override public Iterable call(String x) { return Lists.newArrayList(x.

Re: Change print() in JavaNetworkWordCount

2014-03-27 Thread Eduardo Costa Alfaia
Thank you very much Sourav BR Em 3/26/14, 17:29, Sourav Chandra escreveu: def print() { def foreachFunc = (rdd: RDD[T], time: Time) => { val total = rdd.collect().toList println ("---") println ("Time: " + time) println ("

Re: Change print() in JavaNetworkWordCount

2014-03-26 Thread Sourav Chandra
This works just fine without any compilation error: def print() { def foreachFunc = (rdd: RDD[T], time: Time) => { val total = rdd.collect().toList println ("---") println ("Time: " + time) println ("-

Re: Change print() in JavaNetworkWordCount

2014-03-26 Thread Eduardo Costa Alfaia
Thanks Guys for reply, but I have found this piece of code in streaming: def print() { 585 def foreachFunc = (rdd: RDD[T], time: Time) => { 586 //val first11 = rdd.take(11) 587 //val first100 = rdd.take(100) 588 val total = rdd.collect() 589 println ("---

Re: Change print() in JavaNetworkWordCount

2014-03-25 Thread Sourav Chandra
You can extend DStream and override print() method. Then you can create your own DSTream extending from this. On Tue, Mar 25, 2014 at 6:07 PM, Eduardo Costa Alfaia < e.costaalf...@unibs.it> wrote: > Hi Guys, > I think that I already did this question, but I don't remember if anyone > has answere

Change print() in JavaNetworkWordCount

2014-03-25 Thread Eduardo Costa Alfaia
Hi Guys, I think that I already did this question, but I don't remember if anyone has answered me. I would like changing in the function print() the quantity of words and the frequency number that are sent to driver's screen. The default value is 10. Anyone could help me with this? Best Rega