在hortonworks沙盒vm中创建flume代理,将天气数据流到hdfs中

zlwx9yxi  于 2021-06-04  发布在  Flume
关注(0)|答案(1)|浏览(318)

**结案。**此问题不可复制或由打字错误引起。它目前不接受答案。
**想改进这个问题吗?**更新问题,使其成为堆栈溢出的主题。

四年前关门了。
改进这个问题
我正在配置flume来传输天气数据,我已经编写了flume代理,如下所示,
weatheragent.sources=天气
weatheragent.sinks=hdfs写入
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=数据流
weatheragent.channels.memorychannel.type=内存
weatheragent.channels.memorychannel.capacity=10000
weatheragent.sources.weather.channels=记忆频道
weatheragent.sinks.hdfs write.channel=内存通道
我得到错误作为
天气代理不包含任何使其无效的有效频道。
我是新来的flume,我不知道哪些所有参数要添加到代理配置文件,我甚至不知道编写的代理是正确的或错误的,请帮助我解决这个问题。如果有任何帮助链接,写自定义或新的代理,请张贴。
提前谢谢
苏约格

vs3odd8k

vs3odd8k1#

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

相关问题