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

随着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
Loading project definition from /home/rof/bin/spark/project/project
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
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
Set current project to spark-parent (in build file:/home/rof/bin/spark/)
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
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没有问题.

最佳答案 我试过sbt / sbt汇编-Phadoop-2.4 -Dhadoop.version = 2.4.0也失败了.我的spark安装在/usr/bin中,所以我尝试使用root权限重新运行,这似乎解决了它.我想知道是否有一个失败的写入表现为一个完全不同的错误.

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

点赞