运行w/一个简单的SBT项目w/ Java 7(详见下文),并在命令行调用sbt run (没有IntelliJ或其他任何东西)
来源
import scala.tools.nsc.{ Global, Settings }
object Playground extends App {
val compiler = new Global(new Settings())
val testFiles = List("Test.scala")
val runner = new compiler.Run()
val result = runner.compile(te
当我尝试在scala IDE中执行sparksql代码时,我得到了下面的错误,有人能帮我解决这个问题吗?
spark build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page. spark Unknown Scala Version Problem
akka-remote_2.10-2.3.11.jar o
我在Scala中处理解析和scala.tools.nsc.interactive.Global,在执行sbt下的测试时遇到了一个问题。这些测试在EclipseandJUnitRunner和ScalaTest插件中运行良好。在谷歌上花了很长时间之后,我想不出如何解决这个问题。
当我执行sbt test时,会引发以下错误:
Exception encountered when attempting to run a suite with class name: compileutils.CompileTest *** ABORTED ***
[info] java.lang.Exception
我试图使用命令行编译并运行Scala的WordCOunt程序,而没有任何Maven和sbt支持。我用来编译scala程序的命令是
scalac -classpath /spark-2.3.0-bin-hadoop2.7/jars/ Wordcount.scala
import org.apache.spark._
import org.apache.spark.SparkConf
/** Create a RDD of lines from a text file, and keep count of
* how often each word appears.
*/
object w
在Window命令中,我安装Scala和SBT。运行控制台命令时,从SBT获取以下错误。
有人能帮我解决这个问题吗?
获得低于错误的>sbt
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Set current project to sujitd (in build file:/C:/Users/sujitd/)
>控制台
[info] Compiling 1 Scala source to C:\Users\suj
因此,我一直在尝试在IntelliJ IDEA中使用SBT创建一个Scala项目。我已经下载了JetBrains Scala插件。我的系统需要一个代理来连接到互联网,这是我在IntelliJ IDEA代理设置中设置的,我还设置了所有环境变量JAVA_HOME、SCALA_HOME、HTTP_PROXY
如果我遗漏了什么,请告诉我
堆栈跟踪附加在下面。
[info] Loading project definition from D:\Java\Scala\Coursera\HelloTest03\project
[info] Set current project to HelloTest03
我正在编译一个带有Scala2.10.5的77个Scala文件的项目。
我收到了0条警告和1条奇怪的错误信息:
[ERROR] type mismatch;
found : Array[?B]
required: scala.collection.GenTraversableOnce[?]
Note that implicit conversions are not applicable because they are ambiguous:
both method booleanArrayOps in object Predef of type (xs: Array[Boolean
我试图在我的Scala项目中使用Bouncy城堡,但由于某种原因,它无法编译。我一直在犯这个错误:
Error:scalac: Error: object java.lang.Object in compiler mirror not found.
scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
at scala.reflect.internal.MissingRequirementError$.signal(MissingRequ
我刚刚下载了对接器映像,以建立一个包含两个工作节点的星火集群。集群已经启动并正在运行,但是我想将scala文件提交到这个集群中。我无法在此启动spark-shell。
当我使用另一个码头映像时,我可以使用spark-shell启动它。请有人解释一下,如果我需要在映像中分别安装scala,还是有不同的启动方式?
更新
下面是错误bash: spark:命令command
bash: spark-shell: command not found
root@a7b0682ff17d:/opt/spark# ls /home/shangupta/Scripts/
ProfileData.json
在执行过程中,我们正在使用Spark结构化流处理Kafka,我们得到的问题如下:
Ivy Default Cache set to: /root/.ivy2/cache
The jars for the packages stored in: /root/.ivy2/jars
:: loading settings :: url = jar:file:/usr/hdp/2.6.3.0-235/spark2/jars/ivy-2.4.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
org.apache.spark#spark-
在.formParam of 中传递"Login“请求时出错。有人能帮忙吗?谢谢:-)
这是我的剧本
// Random user login logout
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.core.validation._
class mamLoginLogout extends Simulation {
va
我正在运行64位OpenSUSE 12.1,今天我从官方网站下载了最新的Scala2.9.2,在解压缩tgz并转到scala-2.9.2/bin目录后,我执行了" Scala“并收到了以下错误消息:
[init] error: error while loading <root>, error in opening zip file
Failed to initialize compiler: object scala not found.
** Note that as of 2.8 scala does not assume use of the java class
我试图更新到Scala 2.11.0-M5,但遇到了问题。我使用scallop,所以我需要使用Scala 2.11.0-M5构建它,因为我找不到预构建的jar。scallop的编译进行得很好,但是当我尝试运行"sbt publish-local“时,当它试图构建文档时,我得到了以下错误。在我看来,这看起来像是在尝试构建某个sbt源文件。我试图为sbt (或使用scala 2.11.0-M5构建的sbt jar )找到较新的源代码,但失败了。有没有人能提点建议呢?
非常感谢!
[info] Generating Scala API documentation for main sourc
我正在尝试使用spark sql (scala)从Hive表中读取数据,它抛出的错误如下
ERROR hive.log: error in initSerDe: java.lang.ClassNotFoundException Class org.apache.hive.hcatalog.data.JsonSerDe not found
java.lang.ClassNotFoundException: Class org.apache.hive.hcatalog.data.JsonSerDe not found
at org.apache.hadoop.conf.Config
下面是我正在尝试执行的代码。我想我错过了任何包,但不确定需要导入哪个包
scala> spark.driver.extraClassPath /user/hadoop/ojdbc6.jar
<console>:33: error: value driver is not a member of org.apache.spark.sql.SparkSession
spark.driver.extraClassPath /user/hadoop/ojdbc6.jar
^
<console>:33: