我将什么添加到我的SBT并包含在我的Scala类头中以构建一个SnappyJob以通过snappy-job.sh提交来使用?
我试图做一些基本的" Hello World"在尝试与基于Spark的其他库结合构建作业之前,以SnappyData作业的形式工作。
我一开始就陷入困境,试图构建一个程序的shell,如下所述:
https://snappydatainc.github.io/snappydata/programming_guide/snappydata_jobs/
我已输入以下内容:
class snappytest implements SnappySQLJob {
/** SnappyData uses this as an entry point to execute SnappyData jobs. **/
def runSnappyJob(snappy: SnappySession, jobConfig: Config): Any = {}
/** SnappyData calls this function to validate the job input and reject invalid job requests **/
def isValidJob(snappy: SnappySession, config: Config): SnappyJobValidation = {}
}
在页面的下方,它说"对于写作业,用户需要将snappydata-cluster_2.11:1.0.0包含在他们的项目依赖项中。"我的SBT有:
name := "snappytest"
version := "0.1"
scalaVersion := "2.11.11"
libraryDependencies += "io.snappydata" % "snappy-spark-core_2.11" % "2.1.1.1"
libraryDependencies += "io.snappydata" % "snappy-spark-sql_2.11" % "2.1.1.1"
libraryDependencies += "io.snappydata" % "snappydata-cluster_2.11" % "1.0.0"
我的类文件的标题有:
import org.apache.spark.sql._
import org.apache.spark.sql.SnappySQLJob
IntelliJ IDEA在IDE中给出了以下错误。