cd /usr/hdp/3.1.4.0-315/kafka/bin
查询列表
kafka-topics.sh --list --zookeeper datalake-spark1:2181
创建
./kafka-topics.sh --create --topic zz2zj --zookeeper datalake-spark1:2181 --partitions 3 --replication-factor 3
./kafka-topics.sh --create --topic pqbds --zookeeper datalake-spark1:2181 --partitions 3 --replication-factor 3
删除
bin/kafka-topics.sh --delete --zookeeper pb1:2181 --topic wzsstopic
消费者
bin/kafka-console-consumer.sh --bootstrap-server pb1:6667,pb2:6667,pb3:6667,pb4:6667,pb5:6667 --topic wzsstopic
生产者
bin/kafka-console-producer.sh --broker-list pb1:6667,pb2:6667,pb3:6667,pb4:6667,pb5:6667 --topic testtopic
cd /usr/hdp/3.1.4.0-315/kafka/ && bin/kafka-console-consumer.sh --bootstrap-server pb1:6667,pb2:6667,pb3:6667,pb4:6667,pb5:6667 --topic testtopic --from-beginning
/usr/hdp/current/flume-server/bin/flume-ng
/usr/hdp/current/flume-server/bin/flume-ng agent --conf /usr/hdp/current/flume-server/conf/ --conf-file /data/ftpuser1/flume/aqjc.conf --name aqjc -Dflume.root.logger=INFO,console