0

我正在尝试通过为我的项目运行 sbt 程序集来制作一个胖罐子。我收到以下错误:

[error] (root/*:assembly) deduplicate: different file contents found in the following:
[error] /Users/xyz/.ivy2/cache/org.apache.hadoop/hadoop-mapreduce-client-core/jars/hadoop-mapreduce-client-core-2.2.0.jar:org/apache/hadoop/filecache/DistributedCache.class
[error] /Users/xyz/.ivy2/cache/org.apache.hadoop/hadoop-core/jars/hadoop-core-2.0.0-mr1-cdh4.7.1.jar:org/apache/hadoop/filecache/DistributedCache.class

hadoop-mapreduce-client-core 的 DistributedCache 现已弃用。在我的 build.sbt 中,我包括:

"org.apache.hadoop" % "hadoop-client" % "2.0.0-mr1-cdh4.7.1" excludeAll(
    ExclusionRule(organization = "javax.servlet"))

依赖是这样的:

org.apache.hadoop:hadoop-client:2.2.0 
 org.apache.hadoop:hadoop-mapreduce-client-app:2.2.0
  org.apache.hadoop:hadoop-mapreduce-client-core:2.2.0

我该如何处理?

提前致谢!

4

1 回答 1

0

如果您打算在依赖 hadoop-client:2.2.0 时加载 mapreduce-client-app 的依赖 jar,只需添加不及物:

"org.apache.hadoop" % "hadoop-client" % "2.2.0" intransitive()

这将仅包括 hadoop-client:2.2.0 jar 并排除其所有依赖项。

于 2015-02-10T17:43:06.703 回答