0

我正在配置水槽以流式传输天气数据,我已经编写了水槽代理,如下所示,

WeatherAgent.sources= 天气

WeatherAgent.sinks = hdfs-write

WeatherAgent.channels=内存通道

WeatherAgent.sources.Weather.type = 天气

WeatherAgent.sources.Weather.bind = api.openweathermap.org/data/2.5/forecast/city?id=524901&APPID=*********

WeatherAgent.sources.Weather.port = 11111

WeatherAgent.sinks.hdfs-write.type = hdfs

WeatherAgent.sinks.hdfs-write.hdfs.path = hdfs://localhost:8020/user/hadoop/flume

WeatherAgent.sinks.hdfs-write.rollInterval = 30

WeatherAgent.sinks.hdfs-write.hdfs.writeFormat=文本

WeatherAgent.sinks.hdfs-write.hdfs.fileType=DataStream

WeatherAgent.channels.memoryChannel.type = 内存

WeatherAgent.channels.memoryChannel.capacity=10000

WeatherAgent.sources.Weather.channels=memoryChannel

WeatherAgent.sinks.hdfs-write.channel=memoryChannel

我收到错误

天气代理不包含任何有效频道,使其无效。

我是flume的新手,我不知道代理配置文件中要添加哪些参数,我什至不知道写的代理是对还是错,请帮我解决这个问题。如果有任何帮助链接可用于编写自定义或新代理,请发布。

提前致谢

苏约格

4

1 回答 1

0
 it is type mismatching. In your configuration file you mentioned  

    WeatherAgent.channels= memory-channel

  but you are using  memoryChannel instead of memory-channel

    WeatherAgent.channels.memoryChannel.type = memory

    WeatherAgent.channels.memoryChannel.capacity=10000

    WeatherAgent.sources.Weather.channels=memoryChannel
于 2015-03-17T07:02:27.460 回答