apache/airflow

Track SparkSubmitHook Yarn Cluster application with Yarn CLI

クローズ

#24,171 opened on 2022/06/03

 (16 件のコメント) (0 件のリアクション) (0 人の担当者)Python (16,781 件のフォーク)batch import
area:providersgood first issuekind:featureprovider:apache-spark

Repository metrics

Stars
 (44,809 個のスター)
PR merge metrics
 (平均マージ 7d 18h) (30d で 834 merged PRs)

説明

Description

SparkSubmitHook should track yarn cluster-mode application status with yarn CLI rather than rely on spark-submit process logs. This would cut back on excessive memory usage and also make it much easier to make the operator deferrable later on.

Use case/motivation

While running most of our Spark workloads in Yarn cluster mode using SparkSubmitHook, we observed that celery workers were consistently low on memory. The main driver for the high memory consumption were spark-submit processes started from SparkSubmitHook, that took about 500mb of memory even though in yarn cluster mode they were doing essentially next to none of actual work. We refactored the hook to kill spark-submit process right after Yarn accepts the application and track the status with yarn application -status calls similar to how spark standalone mode is being tracked.

Another motivation for the change is to prepare the operator to be made deferrable later on. Polling from external java process that needs to be kept alive until operator exits can't be made deferrable. Using Yarn CLI for polling would fit easily with how deferrable operators work.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

コントリビューターガイド