Need help on Kafka on Cloudera.
I wrote a program in pySpark in PyCharm it works good.
from kafka import KafkaProducer
from kafka.errors import KafkaError
producer = KafkaProducer(bootstrap_servers=['192.168.56.103:9092'])
tes = producer.send('my-first-topic', "this message from pyspark")
producer.flush()
but when I run in my Linux Cloudera machine I get
File "/home/cloudera/kafka/kproducer.py", line 1, in <module>
from kafka import KafkaProducer
ImportError: No module named kafka
using command spark2-submit kproducer.py