Lighter configuration

November 26, 2025 ยท View on GitHub

Lighter can be configured by using environment variables. Currently, Lighter supports only one of backends on single deployment: Yarn or Kubernetes.

Global properties

PropertyDescriptionDefault
LIGHTER_MAX_RUNNING_JOBSMax running Batch jobs in parallel5
LIGHTER_MAX_STARTING_JOBSMax starting Batch jobs in parallel5
LIGHTER_MAX_RUNNING_SESSIONSMax running sessions in parallel5
LIGHTER_SPARK_HISTORY_SERVER_URLSpark history server URL used on the Lighter UIhttp://localhost/spark-history/
LIGHTER_EXTERNAL_LOGS_URL_TEMPLATETemplate for link to external logs (Grafana, Graylog, etc.) used on the Lighter UI. Allowed placeholders: {{id}}, {{appId}}, {{createdTs}}
LIGHTER_PY_GATEWAY_PORTPort for live Spark session communication25333
LIGHTER_URLURL which can be used to access Lighter form Spark Jobhttp://lighter.spark:8080
LIGHTER_ZOMBIE_INTERVALHow long for Lighter to try to fetch the status of the job before marking it as a zombie. (For jobs that "disappear" before Lighter could determine their final status)30m
LIGHTER_SESSION_TIMEOUT_INTERVALjava.time.Duration representing session lifetime (from last statement creation). Use 0m value to disable90m
LIGHTER_STATE_RETAIN_INTERVALjava.time.Duration representing how long finished session and batch history will be retained before automatic cleanup. If not set, cleanup is disabled.
LIGHTER_SESSION_TIMEOUT_ACTIVEShould Lighter kill sessions with waiting statements (obsolete when LIGHTER_SESSION_TIMEOUT_INTERVAL is 0m)false
LIGHTER_SESSION_SCHEDULE_INTERVALjava.time.Duration representing the interval at which a task is triggered to initiate scheduled sessions1m
LIGHTER_SESSION_TRACK_RUNNING_INTERVALjava.time.Duration representing the interval at which a task is triggered to process and update running session state2m
LIGHTER_STORAGE_JDBC_URLJDBC url for lighter storagejdbc:h2:mem:lighter
LIGHTER_STORAGE_JDBC_USERNAMEJDBC usernamesa
LIGHTER_STORAGE_JDBC_PASSWORDJDBC password
LIGHTER_STORAGE_JDBC_DRIVER_CLASS_NAMEJDBC driver class nameorg.h2.Driver
LIGHTER_BATCH_DEFAULT_CONFDefault conf props for batch applications (JSON)*
LIGHTER_SESSION_DEFAULT_CONFDefault conf props for session applications (JSON)
LIGHTER_CONFIG_JSONAny set of Lighter config in JSON format. For permanent sessions use: {"lighter":{"session":{"permanent-sessions":[...]}}}. List of configurations for permanent sessions

* default configs will be merged with configss provided in submit request, if property is defined in submit request, default will be ignored. Example of LIGHTER_BATCH_DEFAULT_CONF: {"spark.kubernetes.driverEnv.TEST1":"test1"}.

Kubernetes configuration

PropertyDescriptionDefault
LIGHTER_KUBERNETES_ENABLEDKubernetes enabledfalse
LIGHTER_KUBERNETES_MASTERKubernetes master URLk8s://kubernetes.default.svc.cluster.local:443
LIGHTER_KUBERNETES_NAMESPACEKubernetes namespacespark
LIGHTER_KUBERNETES_MAX_LOG_SIZEMax lines of log to store on DB500
LIGHTER_KUBERNETES_SERVICE_ACCOUNTKubernetes service accountspark

YARN configuration

PropertyDescriptionDefault
LIGHTER_YARN_ENABLEDYarn enabled (Kubernetes should be disabled)false
LIGHTER_YARN_URLYarn API URL, /ws/v1/cluster/ will be appended
HADOOP_CONF_DIRPath to core-site.xml,hdfs-site.xml and yarn-site.xml files
LIGHTER_YARN_KERBEROS_PRINCIPALKerberos principal used for job management*
LIGHTER_YARN_KERBEROS_KEYTABKerberos keytab used for job management

* Principal & Keytab provided in LIGHTER_YARN_KERBEROS_PRINCIPAL and LIGHTER_YARN_KERBEROS_KEYTAB will be used by spark job as well, if spark.kerberos.keytab is not explicitly declared in LIGHTER_BATCH_DEFAULT_CONF or provided on submit request.