kafka官方文檔操做:spa
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
kafka在cloudera中的相關操做與官方文檔中的有稍微的差異:code
bin/kafka-topics.sh --create --zookeeper localhost:2181/kafka --replication-factor 1 --partitions 1 --topic test
這是由於在cloudera中kafka在zookeeper中的kafka文件夾中文檔