簡體   English   中英

需要幫助將kafka源調試為帶水槽的hdfs接收器

[英]Need help debugging kafka source to hdfs sink with flume

我正在嘗試將數據從kafka(最終我們將使用在其他實例上運行的kafka)發送到hdfs。 我認為必須使用水槽或某種接收協議才能將數據導入hdfs。 因此,我們正在使用cloudera的水槽服務和hdfs。

這是我的flume-conf文件。 另一個conf文件為空

tier1.sources=source1
tier1.channels=channel1
tier1.sinks=sink1

tier1.sources.source1.type=org.apache.flume.source.kafka.KafkaSource
tier1.sources.source1.zookeeperConnect=localhost:2181
tier1.sources.source1.topic=test
tier1.sources.source1.groupId=flume
tier1.sources.source1.channels=channel1
tier1.sources.source1.interceptors=i1
tier1.sources.source1.interceptors.i1.type=timestamp
tier1.sources.source1.kafka.consumer.timeout.ms=100

tier1.channels.channel1.type=memory
tier1.channels.channel1.capacity=10000
tier1.channels.channel1.transactionCapacity=1000

tier1.sinks.sink1.type=hdfs
tier1.sinks.sink1.hdfs.path=/tmp/kafka/test/data
tier1.sinks.sink1.hdfs.rollInterval=5
tier1.sinks.sink1.hdfs.rollSize=0
tier1.sinks.sink1.hdfs.rollCount=0
tier1.sinks.sink1.hdfs.fileType=DataStream

當我啟動kafka使用者時,它可以在localhost:2181上從kafka生產者那里獲取消息。 但是我沒有看到來自水槽代理的任何錯誤,也沒有放入hdfs。 我也找不到任何日志文件。

這就是我啟動代理的方式。

flume-ng agent --conf /opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/flume-ng/conf --conf-file flume-conf --name agent1 -Dflume.root.logger=DEBUG,INFO,console

請幫助?

修復。

必須將--name agent1更改為--name tier1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM