airflow.providers.cncf.kubernetes.operators.spark_kubernetes

Module Contents

class airflow.providers.cncf.kubernetes.operators.spark_kubernetes.SparkKubernetesOperator(*, application_file: str, namespace: Optional[str] = None, kubernetes_conn_id: str = 'kubernetes_default', api_group: str = 'sparkoperator.k8s.io', api_version: str = 'v1beta2', **kwargs)[source]

Bases: airflow.models.BaseOperator

Creates sparkApplication object in kubernetes cluster:

See also

For more detail about Spark Application Object have a look at the reference: https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/v1beta2-1.1.0-2.4.5/docs/api-docs.md#sparkapplication

Parameters
  • application_file (str) – Defines Kubernetes ‘custom_resource_definition’ of ‘sparkApplication’ as either a path to a ‘.json’ file or a JSON string.

  • namespace (str) – kubernetes namespace to put sparkApplication

  • kubernetes_conn_id (str) – The kubernetes connection id for the to Kubernetes cluster.

  • api_group (str) – kubernetes api group of sparkApplication

  • api_version (str) – kubernetes api version of sparkApplication

template_fields = ['application_file', 'namespace'][source]
template_ext = ['.yaml', '.yml', '.json'][source]
ui_color = #f4a460[source]
execute(self, context)[source]

Was this entry helpful?