Class AutoRecreatingSparkSessionSupplier

  • All Implemented Interfaces:
    java.util.function.Supplier<org.apache.spark.sql.SparkSession>

    public class AutoRecreatingSparkSessionSupplier
    extends java.lang.Object
    implements java.util.function.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 Summary

      Constructors 
      Constructor Description
      AutoRecreatingSparkSessionSupplier​(org.apache.spark.SparkConf sparkConf, java.util.List<cern.nxcals.common.config.SparkSessionModifier> sessionModifiers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.spark.sql.SparkSession get()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AutoRecreatingSparkSessionSupplier

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

      • get

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