Skip to content

Commit

Permalink
Add dependencies in run --spark-standalone tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Oct 14, 2022
1 parent e46a383 commit c4d3e15
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ abstract class SparkTestDefinitions(val scalaVersionOpt: Option[String]) extends
protected def simpleJobInputs(spark: Spark) = TestInputs(
os.rel / "SparkJob.scala" ->
s"""//> using lib "org.apache.spark::spark-sql:${spark.sparkVersion}"
|//> using lib "com.chuusai::shapeless:2.3.10"
|//> using lib "com.lihaoyi::pprint:0.7.3"
|
|import org.apache.spark._
|import org.apache.spark.sql._
Expand All @@ -72,7 +74,12 @@ abstract class SparkTestDefinitions(val scalaVersionOpt: Option[String]) extends
| import spark.implicits._
| def sc = spark.sparkContext
| val accum = sc.longAccumulator
| sc.parallelize(1 to 10).foreach(x => accum.add(x))
| sc.parallelize(1 to 10).foreach { x =>
| import shapeless._
| val l = x :: HNil
| accum.add(l.head)
| }
| pprint.err.log(accum.value)
| println("Result: " + accum.value)
| }
|}
Expand Down

0 comments on commit c4d3e15

Please sign in to comment.