我正在尝试通过为我的项目运行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
我该如何处理?
提前致谢!
答案 0 :(得分:0)
如果您打算在依赖hadoop-client时加载mapreduce-client-app的依赖jar:2.2.0,只需简单地添加不及物:
"org.apache.hadoop" % "hadoop-client" % "2.2.0" intransitive()
这将只包含hadoop-client:2.2.0 jar并排除其所有依赖项。