Skip to content

[SPARK-52536] Set AsyncProfilerLoader extractionDir to spark local dir #51229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

wForget
Copy link
Member

@wForget wForget commented Jun 20, 2025

What changes were proposed in this pull request?

Set AsyncProfilerLoader extractionDir to spark local dir

Why are the changes needed?

AsyncProfilerLoader uses user.home dir to store the extracted libraries by default . When user.home dir is not initialized, it will cause AsyncProfilerLoader.load to fail.

https://github.com/jvm-profiling-tools/ap-loader/blob/main/src/main/java/one/profiler/AsyncProfilerLoader.java#L139-L152

We can specify AsyncProfilerLoader.extractionDir to spark local dir to avoid this issue.

Does this PR introduce any user-facing change?

How was this patch tested?

Tested manually in our internal yarn cluster

image

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

No

@HyukjinKwon
Copy link
Member

cc @parthchandra

Copy link
Contributor

@parthchandra parthchandra left a comment

Choose a reason for hiding this comment

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

lgtm. Thank you for catching and fixing this @wForget!

@HyukjinKwon
Copy link
Member

Merged to master.

haoyangeng-db pushed a commit to haoyangeng-db/apache-spark that referenced this pull request Jun 25, 2025
### What changes were proposed in this pull request?

Set AsyncProfilerLoader extractionDir to spark local dir

### Why are the changes needed?

`AsyncProfilerLoader` uses `user.home` dir to store the extracted libraries by default . When `user.home` dir is not initialized, it will cause `AsyncProfilerLoader.load` to fail.

https://github.com/jvm-profiling-tools/ap-loader/blob/main/src/main/java/one/profiler/AsyncProfilerLoader.java#L139-L152

We can specify `AsyncProfilerLoader.extractionDir` to spark local dir to avoid this issue.

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

Tested manually in our internal yarn cluster

![image](https://github.com/user-attachments/assets/ac6786a4-d061-45e7-8599-00cd61949a1a)

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

No

Closes apache#51229 from wForget/SPARK-52536.

Authored-by: wforget <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
turboFei pushed a commit to apache/celeborn that referenced this pull request Jun 25, 2025
…eborn.worker.jvmProfiler.localDir

### What changes were proposed in this pull request?

Specify `extractionDir` of `AsyncProfilerLoader` with `celeborn.worker.jvmProfiler.localDir`.

### Why are the changes needed?

`AsyncProfilerLoader` uses `user.home` directory to store the extracted libraries by default . When `user.home` directory is not initialized, it will cause `AsyncProfilerLoader#load` to fail. `extractionDir` of `AsyncProfilerLoader` could be specified with `celeborn.worker.jvmProfiler.localDir` to avoid failure of loading.

Backport apache/spark#51229.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manual test.

Closes #3345 from SteNicholas/CELEBORN-2046.

Lead-authored-by: SteNicholas <[email protected]>
Co-authored-by: 子懿 <[email protected]>
Signed-off-by: Wang, Fei <[email protected]>
turboFei pushed a commit to apache/celeborn that referenced this pull request Jun 25, 2025
…eborn.worker.jvmProfiler.localDir

### What changes were proposed in this pull request?

Specify `extractionDir` of `AsyncProfilerLoader` with `celeborn.worker.jvmProfiler.localDir`.

### Why are the changes needed?

`AsyncProfilerLoader` uses `user.home` directory to store the extracted libraries by default . When `user.home` directory is not initialized, it will cause `AsyncProfilerLoader#load` to fail. `extractionDir` of `AsyncProfilerLoader` could be specified with `celeborn.worker.jvmProfiler.localDir` to avoid failure of loading.

Backport apache/spark#51229.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manual test.

Closes #3345 from SteNicholas/CELEBORN-2046.

Lead-authored-by: SteNicholas <[email protected]>
Co-authored-by: 子懿 <[email protected]>
Signed-off-by: Wang, Fei <[email protected]>
(cherry picked from commit 3ee3a26)
Signed-off-by: Wang, Fei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants