Re: Similar code in Java

2015-02-11 Thread Eduardo Costa Alfaia
Thanks Ted. > On Feb 10, 2015, at 20:06, Ted Yu wrote: > > Please take a look at: > examples/scala-2.10/src/main/java/org/apache/spark/examples/streaming/JavaDirectKafkaWordCount.java > which was checked in yesterday. > > On Sat, Feb 7, 2015 at 10:53 AM, Eduardo Costa Alfaia

Re: Similar code in Java

2015-02-10 Thread Ted Yu
Please take a look at: examples/scala-2.10/src/main/java/org/apache/spark/examples/streaming/JavaDirectKafkaWordCount.java which was checked in yesterday. On Sat, Feb 7, 2015 at 10:53 AM, Eduardo Costa Alfaia < e.costaalf...@unibs.it> wrote: > Hi Ted, > > I’ve seen the codes, I am using JavaKafk

Re: Similar code in Java

2015-02-07 Thread Eduardo Costa Alfaia
Hi Ted, I’ve seen the codes, I am using JavaKafkaWordCount.java but I would like reproducing in java that I’ve done in scala. Is it possible doing the same thing that scala code does in java? Principally this code below or something looks liked: > val KafkaDStreams = (1 to numStreams) map {_ =

Re: Similar code in Java

2015-02-07 Thread Ted Yu
Can you take a look at: ./examples/scala-2.10/src/main/java/org/apache/spark/examples/streaming/JavaKafkaWordCount.java ./external/kafka/src/test/java/org/apache/spark/streaming/kafka/JavaKafkaStreamSuite.java Cheers On Sat, Feb 7, 2015 at 9:45 AM, Eduardo Costa Alfaia wrote: > Hi Guys, > > Ho

Similar code in Java

2015-02-07 Thread Eduardo Costa Alfaia
Hi Guys, How could I doing in Java the code scala below? val KafkaDStreams = (1 to numStreams) map {_ => KafkaUtils.createStream[String, String, StringDecoder, StringDecoder](ssc, kafkaParams, topicMap,storageLevel = StorageLevel.MEMORY_ONLY).map(_._2) } val unifiedStream =