【问题标题】:Need help debugging kafka source to hdfs sink with flume需要帮助使用flume调试kafka源到hdfs sink
【发布时间】:2016-06-09 16:14:20
【问题描述】:

我正在尝试将数据从 kafka(最终我们将使用在不同实例上运行的 kafka)发送到 hdfs。我认为 Flume 或某种摄取协议对于将数据导入 hdfs 是必要的。所以我们使用的是cloudera的flume服务和hdfs。

这是我的水槽配置文件。另一个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

请帮忙?

【问题讨论】:

    标签: hadoop hdfs apache-kafka flume flume-ng


    【解决方案1】:

    修复它。

    必须改变 --名称代理1 to --name tier1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-08-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多