【发布时间】:2013-09-11 15:48:34
【问题描述】:
我有 2 个 CDH4 集群。 一个带有 CentOS 6.4(真实硬件)另一个 Ubuntu 12.04(Amazon EC2)。
手动制作的所有配置文件相同(使用 Cloudera 管理器)。 我尝试开始Cloudera-twitter-example。当我在 CentOS 集群上启动 flume 时,它可以正常工作。但是在 Ubuntu 集群上 Flume 在日志文件中给出了这样的错误:
2013-09-11 15:04:54,491 INFO org.apache.flume.instrumentation.MonitoredCounterGroup: Component type: SINK, name: HDFS started
2013-09-11 15:04:54,527 ERROR org.apache.flume.lifecycle.LifecycleSupervisor: Unable to start EventDrivenSourceRunner: { source:com.cloudera.flume.source.TwitterSource
{name:Twitter,state:IDLE} } - Exception follows.
java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery;
经过一番谷歌搜索后,我发现this solution in comments by Suresh E Gopalan 2013 年 8 月 20 日凌晨 2:43
所以我们有另一个 JAR 文件 search-contrib-0.9.1-cdh4.3.0-SNAPSHOT-jar-with-dependencies.jar 与 同一个类并且与 FLUME_CLASSPATH 中的正确类冲突 暂时将其重命名为 .org 扩展名,以便将其排除在外 从启动时的类路径
重命名这个 jar 后,Flume 开始在 Ubuntu 集群上工作。 在 CentOS 集群上,我有相同的 jar 和相同的类,但它不需要重命名。
为什么会发生,我应该在 Ubuntu 集群中做些什么更改才能在不重命名的情况下具有相同的行为?
【问题讨论】:
标签: java ubuntu hadoop cloudera flume