首页 文章

需要帮助调试kafka源到hdfs下沉与水槽

提问于
浏览
0

我正在尝试从kafka发送数据(最终我们将使用在不同实例上运行的kafka)到hdfs . 我认为将数据输入hdfs需要使用flume或某种摄取协议 . 所以我们正在使用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消费者时,它可以从一个kafka 生产环境 者那里得到的信息就好在localhost:2181上 . 但我没有看到来自水槽代理的任何错误,也没有任何内容被放入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

请帮忙?

1 回答

  • 0

    固定它 .

    必须将--name agent1更改为--name tier1

相关问题