Running a Spark Word Count in IntelliJ

前端 未结 3 1796
失恋的感觉
失恋的感觉 2021-01-26 08:03

I\'ve spent hours going through You Tube vids and tutorials trying to understand how I run a run a word count program for Spark, in Scala, and the turn it into a jar file. I\'m

3条回答
  •  一生所求
    2021-01-26 08:19

    You can always do WordCount extends App and this should work. I believe its about the way you have structured your project.

    Read more about the app trait here.

    http://www.scala-lang.org/api/2.12.1/scala/App.html

    In any case, please make sure that your directory layout looks like this.

    ./build.sbt
    ./src
    ./src/main
    ./src/main/scala
    ./src/main/scala/WordCount.scala

提交回复
热议问题