
kafka
会发paper的学渣
Computer knows how to connect zero with one,Mathmatic get how to skip from one to infinity
展开
-
sparkstreaming消费kafka
1、安装pip install pyspark==2.4.4, 具体spark环境搭建如下:https://blog.youkuaiyun.com/sslfk/article/details/1238993832、将spark-streaming-kafka包放入python环境的Lib\site-packages\pyspark\jars中,关于spark-streaming-kafka包可以从https://download.youkuaiyun.com/download/sslfk/851159003、代码调用方式:原创 2022-04-12 15:04:07 · 578 阅读 · 1 评论 -
python发送kafka消息
1、安装相关依赖:pip install kafka==1.3.5pip install kafka-python==2.0.22、创建kafka,参考kafka3.0版本部署及相关明令汇总_会发paper的学渣的博客-优快云博客3、代码部分:from kafka import KafkaProducerfrom kafka.errors import kafka_errorsproducer = KafkaProducer(bootstrap_servers = BROKER_原创 2022-04-12 14:55:23 · 1571 阅读 · 1 评论