![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Kafka
kill -9
快乐工作,认真生活。
展开
-
从Kafka topic中获取数据并在Storm中进行分析
从Kafka topic中获取数据 String zks = "x.x.x.x:2181,x.x.x.x:2181,x.x.x.x:2181"; String topic = "test"; String zkRoot = "/storm"; String id = "word";//默认是word BrokerHosts brokerHosts = new Z原创 2015-12-15 11:26:05 · 2545 阅读 · 0 评论 -
Kafka_producer
1、将日志数据收集并发送到Kafka topic中(循环周期CEL\Time) //创建producer对象 Properties props = new Properties(); props.put("metadata.broker.list", "node1:9092,node2:9092,node3:9092");//属性设置 props.put("seria原创 2015-12-15 10:29:07 · 373 阅读 · 0 评论