本帖最后由 bingoogle 于 2017-8-4 10:32 编辑
因为在用Spark 的Mllib 我在LinearRegression.scala文件的头部加上了
import org.apache.spark.internal.Logging
来打印里面的日志信息
然后使用SBT编译源代码 结果就出现错误了(没加上import org.apache.spark.internal.Logging之前,SBT编译都没问题) *[info] Done packaging.
java.lang.RuntimeException: errors exist
at scala.sys.package$.error(package.scala:27)
at org.scalastyle.sbt.Tasks$.onHasErrors$1(Plugin.scala:132)
at org.scalastyle.sbt.Tasks$.doScalastyleWithConfig$1(Plugin.scala:187)
at org.scalastyle.sbt.Tasks$.doScalastyle(Plugin.scala:195)
at SparkBuild$$anonfun$cachedScalaStyle$1$$anonfun$17.apply(SparkBuild.scala:205)
at SparkBuild$$anonfun$cachedScalaStyle$1$$anonfun$17.apply(SparkBuild.scala:192)
at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:235)
at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:235)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:249)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:245)
at sbt.Difference.apply(Tracked.scala:224)
at sbt.Difference.apply(Tracked.scala:206)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:245)
at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:244)
at sbt.Difference.apply(Tracked.scala:224)
at sbt.Difference.apply(Tracked.scala:200)
at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:244)
at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:242)
at SparkBuild$$anonfun$cachedScalaStyle$1.apply(SparkBuild.scala:212)
at SparkBuild$$anonfun$cachedScalaStyle$1.apply(SparkBuild.scala:187)
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:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
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:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (mllib/:scalaStyleOnCompile) errors exist Google和baidu都没找到类型的问题 然后我使用maven编译,结果maven编译通过了 但是因为SBT编译的速度比较快,我还是想把这个问题解决了,使其能够用sbt编译。 请教论坛大神们,可有解决方法~ 感谢~
|