lakehouse_engine.terminators.spark_terminator

Module with spark terminator.

 1"""Module with spark terminator."""
 2
 3from lakehouse_engine.core.exec_env import ExecEnv
 4from lakehouse_engine.utils.logging_handler import LoggingHandler
 5
 6
 7class SparkTerminator(object):
 8    """Spark Terminator class."""
 9
10    _logger = LoggingHandler(__name__).get_logger()
11
12    @classmethod
13    def terminate_spark(cls) -> None:
14        """Terminate spark session."""
15        cls._logger.info("Terminating spark session...")
16        ExecEnv.SESSION.stop()
class SparkTerminator:
 8class SparkTerminator(object):
 9    """Spark Terminator class."""
10
11    _logger = LoggingHandler(__name__).get_logger()
12
13    @classmethod
14    def terminate_spark(cls) -> None:
15        """Terminate spark session."""
16        cls._logger.info("Terminating spark session...")
17        ExecEnv.SESSION.stop()

Spark Terminator class.

@classmethod
def terminate_spark(cls) -> None:
13    @classmethod
14    def terminate_spark(cls) -> None:
15        """Terminate spark session."""
16        cls._logger.info("Terminating spark session...")
17        ExecEnv.SESSION.stop()

Terminate spark session.