繁体   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