This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.core.Version | |
| import com.fasterxml.jackson.databind.{Module, ObjectMapper} | |
| import org.apache.spark.sql.SparkSession | |
| object App { | |
| val spark = SparkSession.builder | |
| .master("local") | |
| .appName("Spark app") | |
| .getOrCreate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.core.Version | |
| import com.fasterxml.jackson.databind.{Module, ObjectMapper} | |
| import org.apache.spark.sql.SparkSession | |
| object App { | |
| val spark = SparkSession.builder | |
| .master("local") | |
| .appName("Spark app") | |
| .getOrCreate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.spark.SparkContext | |
| import org.apache.spark.sql.SparkSession | |
| object App38 extends App { | |
| val sc = new SparkContext("local[1]", "SimpleProg") | |
| val nums = sc.parallelize(List(1, 2, 3, 4)) | |
| println(nums.reduce((a, b) => a - b)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.spark.SparkContext | |
| import org.apache.spark.sql.SparkSession | |
| object App38 /*extends App*/ { | |
| val sc = new SparkContext("local[1]", "SimpleProg") | |
| val nums = sc.parallelize(List(1, 2, 3, 4)) | |
| // println(nums.reduce((a, b) => a - b)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.spark.SparkContext | |
| import org.apache.spark.sql.SparkSession | |
| object App38 /*extends App*/ { | |
| val sc = new SparkContext("local[1]", "SimpleProg") | |
| val nums = sc.parallelize(List(1, 2, 3, 4)) | |
| println(nums.reduce((a, b) => a - b)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my-project | |
| ᄂsubproject1 | |
| ᄂsrc/main/scala | |
| ᄂ com.foo.bar | |
| ├ foo1 | |
| │ ᄂ (...classes) | |
| ᄂsubproject2 | |
| ᄂsrc/main/scala | |
| ᄂ com.foo.bar | |
| ᄂ foo2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sbt run | |
| [info] welcome to sbt 1.7.2 (Oracle Corporation Java 17.0.5) | |
| [info] loading global plugins from /home/dmitin/.sbt/1.0/plugins | |
| [info] loading settings for project playdemo-build from build.sbt,plugins.sbt ... | |
| [info] loading project definition from /media/data/Projects1/playdemo1/playdemo/project | |
| [info] loading settings for project root from build.sbt ... | |
| [info] set current project to playdemo (in build file:/media/data/Projects1/playdemo1/playdemo/) | |
| --- (Running the application, auto-reloading is enabled) --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /media/data/jdk-17.0.5/bin/java -server -Xmx1536M -Dsbt.supershell=false -Didea.managed=true -Dfile.encoding=UTF-8 -Didea.installation.dir=/media/data/idea-IU-211.7628.21 -jar /home/dmitin/.local/share/JetBrains/IntelliJIdea2023.1/Scala/launcher/sbt-launch.jar early(addPluginSbtFile=\"\"\"/tmp/idea2.sbt\"\"\") "; set ideaPort in Global := 34317 ; idea-shell" | |
| [info] welcome to sbt 1.7.2 (Oracle Corporation Java 17.0.5) | |
| [info] loading global plugins from /home/dmitin/.sbt/1.0/plugins | |
| [info] loading settings for project playdemo-build from plugins.sbt,idea2.sbt ... | |
| [info] loading project definition from /media/data/Projects1/playdemo1/playdemo/project | |
| [info] loading settings for project root from build.sbt ... | |
| [info] set current project to playdemo (in build file:/media/data/Projects1/playdemo1/playdemo/) | |
| [info] Defining Global / ideaPort | |
| [info] The new value will be used by Compile / compile, Test / compile | |
| [info] Reapplying settings... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // core/src/main/scala/App.scala | |
| import org.apache.spark.sql.SparkSession | |
| import org.reflections.Reflections | |
| import scala.jdk.CollectionConverters._ | |
| trait Base | |
| class A extends Base /*with Serializable*/ { | |
| def impl(x: Int): String = "ab" + x.toString | |
| } |