Flume启动命令:
$bin/flume-ng agent --conf conf--conf-file conf/flume-conf.properties --name producer-Dflume.root.logger=INFO,console
bin/flume-ng agent --conf ./conf/ -f conf/flume-kafka.conf -Dflume.root.logger=DEBUG,console -n agent1
bin/flume-ng avro-client --conf conf -H localhost -p 44444 -F /root/zyx/test.txt -Dflume.root.logger=DEBUG,console
zkService.sh start
bin/kafka-server-start.sh config/server.properties
bin/flume-ng avro-client --conf conf -H localhost -p 44444 -F /root/zyx/test.txt -Dflume.root.logger=DEBUG,console
zkService.sh start
bin/kafka-server-start.sh config/server.properties
启动及测试命令:
(1) start server
> bin/zookeeper-server-start.shconfig/zookeeper.properties
> bin/kafka-server-start.sh config/server.properties
(2)Create a topic
> bin/kafka-create-topic.sh --zookeeper localhost:2181 --replica 1--partition 1 --topic test
> bin/kafka-list-topic.sh --zookeeperlocalhost:2181
(3)Send some messages
> bin/kafka-console-producer.sh--broker-list localhost:9092 --topic test
(4)Start a consumer
> bin/kafka-console-consumer.sh--zookeeper localhost:2181 --topic test --from-beginning