Skip to content

apps

SparkApp

Bases: BaseModel

App status.

Source code in spark_on_k8s/api/apps.py
20
21
22
23
24
25
26
27
class SparkApp(BaseModel):
    """App status."""

    app_id: str
    status: SparkAppStatus
    driver_logs: bool = False
    spark_ui_proxy: bool = False
    spark_history_proxy: bool = False

list_apps(response, namespace, max_per_page=10, continue_from='') async

List spark apps in a namespace.

Source code in spark_on_k8s/api/apps.py
71
72
73
74
75
76
77
78
79
80
81
82
@router.get("/list_apps/{namespace}")
async def list_apps(
    response: Response, namespace: str, max_per_page: int = 10, continue_from: str = ""
) -> list[SparkApp]:
    """List spark apps in a namespace."""
    continue_from, apps = await _list_apps(
        namespace=namespace,
        max_per_page=max_per_page,
        continue_from=continue_from,
    )
    response.headers["X-Continue"] = continue_from
    return apps

list_apps_default_namespace(response, max_per_page=10, continue_from='') async

List spark apps in the default namespace.

Source code in spark_on_k8s/api/apps.py
57
58
59
60
61
62
63
64
65
66
67
68
@router.get("/list_apps")
async def list_apps_default_namespace(
    response: Response, max_per_page: int = 10, continue_from: str = ""
) -> list[SparkApp]:
    """List spark apps in the default namespace."""
    continue_from, apps = await _list_apps(
        namespace=APIConfiguration.SPARK_ON_K8S_API_DEFAULT_NAMESPACE,
        max_per_page=max_per_page,
        continue_from=continue_from,
    )
    response.headers["X-Continue"] = continue_from
    return apps