Spark straming with kafka is not working

when i give the below command it is not giving me the Y

[kumarrupesh2389619@ip-172-31-38-146 ~]$ yes | kafka-console-producer.sh --broker-list ip-172-31-38-146.ec2.internal:6667 --topic KUMARKAFKA
it is giving like this

and after my spark-submit command program is not waiting it is ending:-
[kumarrupesh2389619@ip-172-31-38-146 kafkasparkint]$ spark-submit --class “KafkaWordCount” --jars spark-streaming-kafka-assembly_2.10-1.5.2.jar target/scala-2.12/k
afkasparkwordcount_2.12-0.1.0-SNAPSHOT.jar ip-172-31-20-247.ec2.internal:2181 spark-streaming-consumer-group KUMARKAFKA 2>/dev/null
[kumarrupesh2389619@ip-172-31-38-146 kafkasparkint]$

it should be keep running
kindly help

Hi Rupesh,

The spark streaming was not working in Spark 2 with Kafka. So, I have re-written the steps, please following these instructions: