Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Aug 9, 2024

What changes were proposed in this pull request?

This PR aims to add SPARK_EXECUTOR_ATTRIBUTE_(APP|EXECUTOR)_ID if CUSTOM_EXECUTOR_LOG_URL is defined.

Why are the changes needed?

Apache Spark has been supported spark.ui.custom.executor.log.url in K8s environment well.

This PR aims to help users use it more easily by providing the required SPARK_EXECUTOR_ATTRIBUTE_APP_ID and SPARK_EXECUTOR_ATTRIBUTE_EXECUTOR_ID automatically if spark.ui.custom.executor.log.url is defined.

Does this PR introduce any user-facing change?

  • No by default because spark.ui.custom.executor.log.url is not used.
  • When spark.ui.custom.executor.log.url is used,
    • For YARN users, there is no change for YARN users because this is K8s only change.
    • For K8s users, this will reduce the existing steps by providing the same environment variables. In addition, the user variables always overwrite this built-in environment variables by design.

How was this patch tested?

No.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the DOCS label Aug 9, 2024

```
spark.executorEnv.SPARK_EXECUTOR_ATTRIBUTE_APP_ID='$(SPARK_APPLICATION_ID)'
spark.executorEnv.SPARK_EXECUTOR_ATTRIBUTE_EXECUTOR_ID='$(SPARK_EXECUTOR_ID)'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this from Apache Spark 4.0.0-preview2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to still mention the feature of spark.executorEnv.SPARK_EXECUTOR_ATTRIBUTE_* here of using any Kubernetes environment variable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's irrelevant to this PR because this PR specifically targets Add SPARK_EXECUTOR_ATTRIBUTE_(APP|EXECUTOR)_ID if CUSTOM_EXECUTOR_LOG_URL is defined.

However, of course, you can make a documentation contribution if you want, @EnricoMi . We will review it separately.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in #47801

@dongjoon-hyun
Copy link
Member Author

Could you review this PR, @viirya ?

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya !

@dongjoon-hyun
Copy link
Member Author

Merged to master for Apache Spark 4.0.0-preview2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants