0

我编写了一个 hadoop 1.0.4 应用程序,它在半分布式模式下本地运行良好。我还在集群上安装了 Cloudera Hadoop 4。我认为 CDH4 运行 hadoop 1.0.4,因为它在 hadoop 站点上被列为稳定版本,但情况似乎并非如此。当我在集群上运行应用程序时,出现以下错误:

12/11/27 16:14:38 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
12/11/27 16:14:38 INFO input.FileInputFormat: Total input paths to process : 16
12/11/27 16:14:39 INFO mapred.JobClient: Running job: job_201211271520_0004
12/11/27 16:14:40 INFO mapred.JobClient:  map 0% reduce 0%
12/11/27 16:14:50 INFO mapred.JobClient: Task Id : attempt_201211271520_0004_m_000013_0, Status : FAILED
Error: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
12/11/27 16:14:50 INFO mapred.JobClient: Task Id : attempt_201211271520_0004_m_000000_0, Status : FAILED
... and so on...

我是否认为这是因为 CHD4 与 hadoop 1.0.4 不兼容?如果是这样,有人知道哪个版本与 hadoop 1.0.4 兼容吗?我宁愿切换 cloudera 软件也不愿重写我的应用程序。

4

1 回答 1

3

你是对的; CDH3 使用 0.20.2 版本,CDH4 使用 2.0.0 版本。Hadoop 版本的命名是一团糟,我不会假装理解它。但看起来您可以根据Cloudera 的这篇博文中所述的以下内容使用 CDH3 :

"The CDH3 distribution incorporated the 0.20.2 Apache Hadoop release plus the features of the 0.20.append and 0.20.security branches that collectively are now known as “1.0.” The Apache Hadoop in CDH3 has been the equivalent of the recently announced Apache Hadoop 1.0 for approximately a year now."

如果是这种情况,我会尝试 CDH3。如果它不起作用,您可能只需要寻找 Cloudera 安装之外的东西。

于 2012-11-27T15:46:46.633 回答