Class AutoRecreatingSparkSessionSupplier

java.lang.Object
cern.nxcals.api.utils.AutoRecreatingSparkSessionSupplier
All Implemented Interfaces:
Supplier<org.apache.spark.sql.SparkSession>

public class AutoRecreatingSparkSessionSupplier extends Object implements Supplier<org.apache.spark.sql.SparkSession>
SparkSession supplier that lazily creates a new instance of SparkSession and stores it locally for the next retrievals. It also recreates and returns a new instance of the SparkSession in case the current one was closed.
  • Constructor Details

    • AutoRecreatingSparkSessionSupplier

      public AutoRecreatingSparkSessionSupplier(org.apache.spark.SparkConf sparkConf, List<cern.nxcals.common.config.SparkSessionModifier> sessionModifiers)
  • Method Details

    • get

      public org.apache.spark.sql.SparkSession get()
      Specified by:
      get in interface Supplier<org.apache.spark.sql.SparkSession>