记一次flume的排错
背景介绍,使用flume读取Kafka并落地数据到HDFS。
初始配置如下:
a1.sources = source1 a1.channels = channel1 a1.sinks = log a1.sources.source1.channels = channel1 a1.sinks.log.channel = channel1 #sources a1.sources.source1.type = org.apache.flume.source.kafka.KafkaSource a1.sources.source1.batchSize = 5000 a1.sources.source1.batchDurationMillis = 2000 a1.sources.source1.kafka.bootstrap.servers = node2:6667 #a1.sources.source1.kafka.topics = new_user_test a1.sources.source1.kafka.consumer.auto.offset.reset=earliest a1.sources.source1.kafka.consumer.group.id = dev-ckafka-bigdata # sinks a1.sinks.log.type = logger #channel1 a1.channels.channel1.type = memory a1.channels.channel1.capacity = 1000 a1.channels.channel1.transactionCapacity=100 a1.channels.channel1.keep-alive = 60
使用命令提交程序
./bin/flume-ng agent -n agent -c conf -f conf/kafka-hdfs.properties
得不到正确结果。
修改后的命令提交:
./bin/flume-ng agent -n agent -c conf -f conf/ckafka-hdfs.properties -Dflume.root.logger=INFO,console
会看到错误提示。