apache - 运行 flume agent 获取 Twitter 数据

标签 apache hadoop flume flume-ng flume-twitter

我一直在尝试在我的 Windows 系统上运行一个 flume 代理来获取 Twitter 数据。我正在关注这个博客 https://acadgild.com/blog/streaming-twitter-data-using-flume

但是,每当我尝试运行 flume 代理时,我都会收到以下错误 -

flume-ng agent -n TwitterAgent -f ./conf/flume.conf

E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\flume-ng.ps1 agent -n TwitterAgent -f ./conf/flume.conf

Resolve-Path : Cannot find path 'E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\conf\flume.conf' because it does not exist.
At E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\flume-ng.ps1:217 char:24 +     $confFile = '"' + (Resolve-Path $confFile).Path + '"' +                        ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (E:\apache-flume...conf\flume.conf:String) [Resolve-Path], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

我试过自己调试它,但没有成功。我试图寻找这个特定的错误,但无法在任何地方找到它。

最佳答案

E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\conf\flume.conf 是否存在于该位置?你确定它在 \bin\conf\flume.conf 而不是 \conf\flume.conf 吗?在这种情况下使用:

flume-ng agent -n TwitterAgent -f ./../conf/flume.conf

或者(更常见),从 E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin 文件夹运行命令:

bin/flume-ng agent -n TwitterAgent -f ./conf/flume.conf

关于apache - 运行 flume agent 获取 Twitter 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55229641/

相关文章:

apache - Dir 迁移到 Flume

apache - .htaccess 中的 DocumentRoot 导致错误

hadoop - Hadoop HDFS 中的数据保留

hadoop - 如何通过Java代码更改Apache flume的配置文件?

hadoop - Twitter Flume数据不是可读格式

php - .htaccess 从子域重定向到子域

Django SSL 证书和静态媒体

hadoop - 可以使用XML创建Hive表,但查询时出现错误

hadoop - 分区器或多个输出

hadoop - 使用 Apache Flume 收集 CPU 时间日志