gpt4 book ai didi

hadoop - Flume--找不到主类 : org. apache.flume.tools.GetJavaProperty

转载 作者:可可西里 更新时间:2023-11-01 16:32:25 25 4
gpt4 key购买 nike

我正在使用 cloudera CDH 4.4。当我运行 flume cmd 时 -

"bin/flume-ng agent -n agentA -f conf/MultipleFlumes.properties -Dflume.root.logger=INFO,console"

我遇到了一个错误:

[cloudera@localhost Flume]$ bin/flume-ng agent -n agentA -f conf/MultipleFlumes.properties -Dflume.root.logger=INFO,console
Warning: No configuration directory set! Use --conf <dir> to override.
Info: Including Hadoop libraries found via (/usr/bin/hadoop) for HDFS access
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flume/tools/GetJavaProperty
Caused by: java.lang.ClassNotFoundException: org.apache.flume.tools.GetJavaProperty
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.flume.tools.GetJavaProperty. Program will exit.
Info: Excluding /usr/lib/hadoop/lib/slf4j-api-1.6.1.jar from classpath
Info: Excluding /usr/lib/hadoop/lib/slf4j-log4j12-1.6.1.jar from classpath
Info: Excluding /usr/lib/hadoop-0.20-mapreduce/lib/slf4j-api-1.6.1.jar from classpath
Info: Including HBASE libraries found via (/usr/bin/hbase) for HBASE access
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flume/tools/GetJavaProperty
Caused by: java.lang.ClassNotFoundException: org.apache.flume.tools.GetJavaProperty
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.flume.tools.GetJavaProperty. Program will exit.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flume/node/Application
Caused by: java.lang.ClassNotFoundException: org.apache.flume.node.Application
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.flume.node.Application. Program will exit.

我试图回应 HADOOP_HOME 但它返回空白。以上命令有什么问题?请指导。

最佳答案

首先,将-c参数添加到命令中,如下所示:

bin/flume-ng agent -n agentA -c conf -f conf/MultipleFlumes.properties -Dflume.root.logger=INFO,console

添加该参数并不能解决问题,但如果您不包含它,您会因为 log4j 配置文件而收到另一个错误。

至于你的问题,检查是否定义了FLUME_HOME,如果是这样,用

取消设置
unset FLUME_HOME

关于hadoop - Flume--找不到主类 : org. apache.flume.tools.GetJavaProperty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24483464/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com