啟動
./bin/kafka-server-start.sh –daemon config/server.properties
//建立主題
$>kafka-topics.sh --zookeeper s202:2181 --topic calllog --create --replication-factor 3 --partitions 4
//檢視主題列表
$>kafka-topics.sh --zookeeper s202:2181 --list
//啟動控制台消費者,消費calllog主題,用於測試.
$>kafka-console-consumer.sh --zookeeper s201:2181 --topic calllog
//啟動控制台消費者,消費calllog主題,用於測試.
$>kafka-console-consumer.sh --zookeeper s201:2181 --topic calllog
//配置flume
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -f /home/airib/work/log.log
# describe the sink
#a1.sinks.k1.type = logger
a1.sinks.k1.type = org.apache.flume.sink.kafka.kafkasink
a1.sinks.k1.topic = test
a1.sinks.k1.brokerlist = localhost:9092
a1.sinks.k1.requiredacks = 1
a1.sinks.k1.batchsize = 20
# use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactioncapacity = 100
# bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c
//flume讀資料到kafka(flume的啟動命令)
bin/flume-ng agent -c conf -f conf/dir-exec.conf -n a1
//啟動hadoop,從kafka讀取資料存放到hbase中
//啟動hbase
start-hbase.sh
kafka啟動命令 Kafka入門
kafka是乙個高效能分布式訊息系統,今天就簡單介紹下基礎入門吧。tar xzf kafka 2.12 2.2.0.tgz cd kafka 2.12 2.2.0二 啟動伺服器kafka使用zookeeper,所以我們要先啟動zookeeper,可以使用安裝檔案裡面的啟動命令啟動乙個單節點的zook...
kafka簡單的啟動命令
我這裡的安裝目錄是 home bigdata kafka 節點名稱為 localhadoop1 進入安裝目錄後輸入 bin kafka server start.sh config server.properties 後台執行 bin kafka server start.sh config ser...
kafka簡單的啟動命令
我這裡的安裝目錄是 home bigdata kafka 節點名稱為 localhadoop1 進入安裝目錄後輸入 bin kafka server start.sh config server.properties 後台執行 bin kafka server start.sh config ser...