0
我是PySpark的新手,我在Ubuntu 14.04上安裝了Kafka單節點和單一代理。從Python下載數據使用Python Spark流
安裝後我測試了使用kafka-console-producer和kafka-console-consume發送和接收數據的Kafka。
以下是我遵循的步驟 將消費者啓動爲消費消息。
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic kafkatopic --from-beginning
啓動生產者在新的終端窗口中發送消息。
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic kafkatopic
[2016-09-25 7:26:58,179] WARN Property topic is not valid (kafka.utils.VerifiableProperties)
Good morning
Future big data
this is test message
在消費終端
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic kafkatopic --from-beginning
Good morning
Future big data
this is test message
從meetup.com以下鏈接產生流數據
http://stream.meetup.com/2/rsvps
我的要求是如何從HTTP站點的流數據採集到使用卡夫卡的火花。什麼是轉換命令下載streamin數據?
下載數據後,我可以找到城市和其他分析計數特定時間間隔。
對於這一點,你必須把數據轉化爲卡夫卡首先,可以通過卡夫卡製作腳本正從捲曲http://stream.meetup.com/2/rsvps輸入來實現 –