[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 @srowen @jerryshao I understand, thank you. I changed the code in my project to keep the program consistent with the latest example. --- If your project is set up for it, you

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread srowen
Github user srowen commented on the issue: https://github.com/apache/spark/pull/17580 In some cases you have to call a Scala API from Java and need to create Scala-specific classes like Tuple2. --- If your project is set up for it, you can reply to this email and have your reply

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread jerryshao
Github user jerryshao commented on the issue: https://github.com/apache/spark/pull/17580 It is just Java8 lambda function, nothing related to Scala... --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 JavaDStream lines = messages.map(new Function, String>() { @Override public String call(Tuple2 tuple2) { return

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 ![Uploading image.png…]() --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread jerryshao
Github user jerryshao commented on the issue: https://github.com/apache/spark/pull/17580 You mean this [line](https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/streaming/JavaKafkaWordCount.java#L76)? It's because our KafkInputDStream

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 eg messages.map(Tuple2::_2) is the Scala grammar code.But JavaKafkaWordCount is a java class. I think the Java example program should be fully implemented in Java code.

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread jerryshao
Github user jerryshao commented on the issue: https://github.com/apache/spark/pull/17580 What's the meaning of "some of the Scala"? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-13 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 @jerryshao Excuse me,I would like to ask, these examples of Java examples, why use some of the Scala to write it?thank you! SparkConf sparkConf = new

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-11 Thread srowen
Github user srowen commented on the issue: https://github.com/apache/spark/pull/17580 I think this is not worth bothering with for the reasons above, and can be closed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-10 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 @jerryshao import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerConfig; import

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-10 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue: https://github.com/apache/spark/pull/17580 Can one of the admins verify this patch? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-10 Thread srowen
Github user srowen commented on the issue: https://github.com/apache/spark/pull/17580 I think I'd go with @jerryshao and not add it if it's an old, auxiliary example anyway --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-10 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 Because of the API changes of Kafka, we do not want to delete it, but to maintain and modify it. Although it is absolutely a Kafka producer code, but this is part of spark streaming, it

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-10 Thread jerryshao
Github user jerryshao commented on the issue: https://github.com/apache/spark/pull/17580 I would say this is not a Spark program, it is absolutely a Kafka producer code. To maintain a Kafka Producer example in Spark is not a good choice, this is a legacy code. Because of the API

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-09 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 When a user use spark to develop a stream application, he first wants to find and learn example program in 'spark \ examples \ src \ main \ java \ org \ apache \ spark \ examples \

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-09 Thread jerryshao
Github user jerryshao commented on the issue: https://github.com/apache/spark/pull/17580 What is the purpose of adding this example? I think we already have a `KafkaWordCountProducer` for the convenience of Kafka streaming example, and we could use that to send events to Kafka. I

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-09 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 Sorry,spark java code style is different from the style of my project team.Now I know, and have been fixed. Use 2-space indentation in general. For function declarations, use 4

[GitHub] spark issue #17580: [20269][Structured Streaming] add class 'JavaWordCountPr...

2017-04-09 Thread guoxiaolongzte
Github user guoxiaolongzte commented on the issue: https://github.com/apache/spark/pull/17580 Title,PR description and motive, has been modified. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not