-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christian Herrera
committed
Aug 5, 2024
1 parent
c00a090
commit a2dde61
Showing
52 changed files
with
414 additions
and
319 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ project/plugins/project/ | |
/docker/spark/data/ | ||
/docker/volume/ | ||
/docker/spark/apps/ | ||
/derby.log |
This file contains 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
This file contains 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
This file contains 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
12 changes: 12 additions & 0 deletions
12
src/main/com/codely/lesson_02_tests_in_spark/video_01__end_to_end_testing/app/SparkApp.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.codely.lesson_02_tests_in_spark.video_01__end_to_end_testing.app | ||
|
||
import org.apache.spark.sql.SparkSession | ||
|
||
trait SparkApp extends App { | ||
|
||
implicit val spark: SparkSession = SparkSession | ||
.builder() | ||
.enableHiveSupport() | ||
.getOrCreate() | ||
|
||
} |
10 changes: 3 additions & 7 deletions
10
...m/codely/lesson_02_tests_in_spark/video_01__end_to_end_testing/app/TotalSpendingApp.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
package com.codely.lesson_02_tests_in_spark.video_01__end_to_end_testing.app | ||
|
||
import com.codely.lesson_02_tests_in_spark.video_01__end_to_end_testing.config.AppContext | ||
import com.codely.lesson_02_tests_in_spark.video_01__end_to_end_testing.job.AvgSpendingJob | ||
import com.codely.lesson_02_tests_in_spark.video_01__end_to_end_testing.job.TotalSpendingJob | ||
import com.codely.lesson_02_tests_in_spark.video_01__end_to_end_testing.service.{Reader, Writer} | ||
|
||
object AvgSpendingApp extends SparkApp { | ||
|
||
private val appName = "avg-spending-app" | ||
object TotalSpendingApp extends SparkApp { | ||
|
||
private val context = AppContext.load(args) | ||
|
||
spark.conf.set("spark.app.name", appName) | ||
|
||
private val reader = Reader() | ||
|
||
private val writer = Writer() | ||
|
||
private val job = AvgSpendingJob(context, reader, writer) | ||
private val job = TotalSpendingJob(context, reader, writer) | ||
|
||
job.run() | ||
} |
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...ain/com/codely/lesson_02_tests_in_spark/video_01__end_to_end_testing/config/CmdArgs.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package com.codely.lesson_02_tests_in_spark.video_01__end_to_end_testing.config | ||
|
||
case class CmdArgs(configFile: Option[String] = None) | ||
case class CmdArgs(configFile: Option[String] = None) |
5 changes: 2 additions & 3 deletions
5
...m/codely/lesson_02_tests_in_spark/video_01__end_to_end_testing/job/TotalSpendingJob.scala
This file contains 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
20 changes: 7 additions & 13 deletions
20
src/main/com/codely/lesson_02_tests_in_spark/video_02__unit_testing/app/AvgSpendingApp.scala
This file contains 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
12 changes: 12 additions & 0 deletions
12
src/main/com/codely/lesson_02_tests_in_spark/video_02__unit_testing/app/SparkApp.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.codely.lesson_02_tests_in_spark.video_02__unit_testing.app | ||
|
||
import org.apache.spark.sql.SparkSession | ||
|
||
trait SparkApp extends App { | ||
|
||
implicit val spark: SparkSession = SparkSession | ||
.builder() | ||
.enableHiveSupport() | ||
.getOrCreate() | ||
|
||
} |
This file contains 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
2 changes: 1 addition & 1 deletion
2
src/main/com/codely/lesson_02_tests_in_spark/video_02__unit_testing/config/CmdArgs.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package com.codely.lesson_02_tests_in_spark.video_02__unit_testing.config | ||
|
||
case class CmdArgs(configFile: Option[String] = None) | ||
case class CmdArgs(configFile: Option[String] = None) |
19 changes: 9 additions & 10 deletions
19
src/main/com/codely/lesson_02_tests_in_spark/video_02__unit_testing/job/AvgSpendingJob.scala
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
src/main/com/codely/lesson_02_tests_in_spark/z_practical_exercise/config/CmdArgs.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package com.codely.lesson_02_tests_in_spark.z_practical_exercise.config | ||
|
||
case class CmdArgs(configFile: Option[String] = None) | ||
case class CmdArgs(configFile: Option[String] = None) |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.