0

我在 c:\hadoop2.5.2 中安装 hadoop,然后在 c:\hadop2.5.2\apache-flume-1.6.0 下解压缩水槽二进制文件

我收到如下所示的错误有什么想法吗?

C:\hadoop2.5.2\apache-flume-1.6.0\bin>flume-ng agent -conf -f conf/flume-twitter.conf -Dflume.root.logger=DEBUG,console -n TwitterAgent

C:\hadoop2.5.2\apache-flume-1.6.0\bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File C:\hadoop2.5.2\apache-
flume-1.6.0\bin\flume-ng.ps1 agent -conf -f conf/flume-twitter.conf -Dflume.root.logger=DEBUG,console -n TwitterAgent
C:\hadoop2.5.2\apache-flume-1.6.0\bin\flume-ng.ps1 : A parameter cannot be found that matches parameter name 'Dflume.root.logger=DEBUG,cons
ole'.
At line:0 char:1
+  <<<<
    + CategoryInfo          : InvalidArgument: (:) [flume-ng.ps1], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : NamedParameterNotFound,flume-ng.ps1

C:\hadoop2.5.2\apache-flume-1.6.0\bin>

我在flume.sh中设置了参数

export JAVA_HOME=C:\Java\jdk1.7.0_79\

# Give Flume more memory and pre-allocate, enable remote monitoring via JMX
export JAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"

# Note that the Flume conf directory is always included in the classpath.
FLUME_CLASSPATH="C:\hadoop2.5.2\apache-flume-1.6.0\lib\flume-sources-1.0-SNAPSHOT.jar"

请大家知道如何解决这个问题吗?

4

1 回答 1

2

我遇到了同样的问题。Flume 网站上的文档似乎已经过时了。这是我尝试过的示例,它对我有用。

bin\flume-ng agent -conf conf -conf-file conf/flume-conf.properties --name agent1 -property "flume.root.logger=INFO,console"

将 -D 替换为 -property 让我们参考 Github 上 Apache Flume 的源代码。从第 20 行看。

所以,你应该尝试:

bin\flume-ng agent -conf -f conf/flume-twitter.conf -property "flume.root.logger=INFO,console" -n TwitterAgent
于 2016-07-06T04:02:01.770 回答