未解决的依赖org.apache.spark#spark-network-common_2.10同时构建spark 1.2.0

时间:2015-02-14 03:21:05

标签: dependencies sbt apache-spark sbt-assembly

使用sbt版本0.13.6

rof@railsonfire_1ad6bd90-94b5-0132-e2d9-5692d74b909b_7f496a9f21bf:~/bin/spark$ sbt/sbt --version
Using /usr/lib/jvm/java-7-openjdk-amd64/ as default JAVA_HOME.
Note, this will be overridden by -java-home if it is set.
sbt launcher version 0.13.6

Spark 1.2.0失败

rof@railsonfire_1ad6bd90-94b5-0132-e2d9-5692d74b909b_7f496a9f21bf:~/bin/spark$ ~/bin/sbt/bin/sbt compile
[info] Loading project definition from /home/rof/bin/spark/project/project
[info] Loading project definition from /home/rof/.sbt/0.13/staging/ad8e8574a5bcb2d22d23/sbt-pom-reader/project
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn]  * com.typesafe.sbt:sbt-git:0.6.1 -> 0.6.2
[warn]  * com.typesafe.sbt:sbt-site:0.7.0 -> 0.7.1
[warn] Run 'evicted' to see detailed eviction warnings
[info] Loading project definition from /home/rof/bin/spark/project
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn]  * org.apache.maven.wagon:wagon-provider-api:1.0-beta-6 -> 2.2
[warn] Run 'evicted' to see detailed eviction warnings
[info] Set current project to spark-parent (in build file:/home/rof/bin/spark/)
[info] Updating {file:/home/rof/bin/spark/}network-shuffle...
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn]  * com.google.guava:guava:10.0.1 -> 14.0.1
[warn] Run 'evicted' to see detailed eviction warnings
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.apache.spark#spark-network-common_2.10;1.2.0: configuration not public in org.apache.spark#spark-network-common_2.10;1.2.0: 'test'. It was required from org.apache.spark#spark-network-shuffle_2.10;1.2.0 test
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      org.apache.spark:spark-network-common_2.10:1.2.0 ((com.typesafe.sbt.pom.MavenHelper) MavenHelper.scala#L76)
[warn]        +- org.apache.spark:spark-network-shuffle_2.10:1.2.0
sbt.ResolveException: unresolved dependency: org.apache.spark#spark-network-common_2.10;1.2.0: configuration not public in org.apache.spark#spark-network-common_2.10;1.2.0: 'test'. It was required from org.apache.spark#spark-network-shuffle_2.10;1.2.0 test
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:243)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:158)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:156)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:147)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:147)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:124)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:64)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
    at sbt.IvySbt.withIvy(Ivy.scala:119)
    at sbt.IvySbt.withIvy(Ivy.scala:116)
    at sbt.IvySbt$Module.withModule(Ivy.scala:147)
    at sbt.IvyActions$.updateEither(IvyActions.scala:156)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1282)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1279)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$84.apply(Defaults.scala:1309)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$84.apply(Defaults.scala:1307)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1312)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1306)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1324)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1264)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1242)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[error] (network-shuffle/*:update) sbt.ResolveException: unresolved dependency: org.apache.spark#spark-network-common_2.10;1.2.0: configuration not public in org.apache.spark#spark-network-common_2.10;1.2.0: 'test'. It was required from org.apache.spark#spark-network-shuffle_2.10;1.2.0 test
[error] Total time: 1 s, completed Feb 13, 2015 10:10:34 PM

实际上背后的原因是什么,以前的版本1.1.0没有问题。

4 个答案:

答案 0 :(得分:1)

我尝试sbt/sbt assembly -Phadoop-2.4 -Dhadoop.version=2.4.0也失败了。我的spark安装在/ usr / bin中,所以我尝试使用root权限重新运行,这似乎解决了它。我想知道是否存在写入失败的错误。

sudo sbt/sbt assembly -Phadoop-2.4 -Dhadoop.version=2.4.0

答案 1 :(得分:1)

这是在sbt 0.13.10-RC1中修复的 https://github.com/sbt/sbt/pull/2345

正如PR解释的那样,这是因为spark使用了sbt-pomreader,而且

  

在Maven上,测试配置被认为是私有的,因此项目依赖于test->测试配置可能不在某些条件下:条件是当某人解析x:y:1.0并且您有一个名为和版本的子项目时,以及其他一些子项目试图依赖它。 (182374c)   当项目发布到Maven然后有人从Github获取代码时会发生这种情况,这就是twitter-util的情况。我在sbt模块化过程中遇到过这种情况,显然它也是在火花发展过程中发生的。

答案 2 :(得分:0)

我在尝试运行 sbt / sbt eclipse 时删除常春藤缓存(〜/ .ivy2 )并重复操作对我有类似的消息。 FWIW,在随后的迭代中,我意识到我已经省略了我在原始构建中使用的hadoop选项,例如,运行 sbt / sbt -Phadoop-2.4 -Dhadoop.version = 2.4.0 eclipse 无需工作必须删除缓存。

答案 3 :(得分:0)

我遇到了同样的问题。 当我尝试使用清晰的sbt env(缓存中没有任何jar)时

build/sbt -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 assembly

工作,也许你可以尝试使用maven
you can see here