Skip to content

Commit

Permalink
Explicitly close spark session after batch ingestion is done
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Moskalenko <moskalenko.alexey@gmail.com>
  • Loading branch information
pyalex committed Apr 27, 2021
1 parent d04ccd4 commit b8f0313
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ object IngestionJob {
case Modes.Offline =>
val sparkSession = BasePipeline.createSparkSession(config)
BatchPipeline.createPipeline(sparkSession, config)
sparkSession.close()
case Modes.Online =>
val sparkSession = BasePipeline.createSparkSession(config)
StreamingPipeline.createPipeline(sparkSession, config).get.awaitTermination
Expand Down

0 comments on commit b8f0313

Please sign in to comment.