Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

What changes were proposed in this pull request?

This is a follow-up of #41709 to address the review comments.

Why are the changes needed?

  1. Use JAVA_HOME prefixed jmap to ensure the same version's JVM and JMAP.
  2. Use the existing stderr instead of merging stderr and stdout via redirectErrorStream
  3. Use tryWithResource.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manual review.

@github-actions github-actions bot added the CORE label Jun 26, 2023
@dongjoon-hyun
Copy link
Member Author

cc @pan3793 and @mridulm

while (line != null) {
if (line.nonEmpty) rows += line
line = r.readLine()
Utils.tryWithResource(new BufferedReader(new InputStreamReader(p.getInputStream()))) { r =>
Copy link
Member Author

Choose a reason for hiding this comment

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

@mridulm . I'll make another PR to limit the number of results and to address your comment for readLine parts. In this PR, I just wrapped with tryWithResource.

Copy link
Member

@pan3793 pan3793 left a comment

Choose a reason for hiding this comment

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

@dongjoon-hyun thanks for fixing this issue.

@dongjoon-hyun
Copy link
Member Author

Thank you for reviewing and fixing the issue, @pan3793 and @yaooqinn .
I didn't realized the level of severity at first glance. Sorry for that. Thank you for your help.

@dongjoon-hyun
Copy link
Member Author

Merged to master!

viirya pushed a commit to viirya/spark-1 that referenced this pull request Oct 19, 2023
### What changes were proposed in this pull request?

This is a follow-up of apache#41709 to address the review comments.

### Why are the changes needed?

1. Use `JAVA_HOME` prefixed `jmap` to ensure the same version's `JVM` and JMAP.
2. Use the existing stderr instead of merging `stderr` and `stdout` via `redirectErrorStream`
3. Use `tryWithResource`.

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

No.

### How was this patch tested?

Manual review.

Closes apache#41731 from dongjoon-hyun/SPARK-44153-2.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Mrhs121 pushed a commit to Mrhs121/spark that referenced this pull request Apr 17, 2024
### What changes were proposed in this pull request?

This is a follow-up of apache#41709 to address the review comments.

### Why are the changes needed?

1. Use `JAVA_HOME` prefixed `jmap` to ensure the same version's `JVM` and JMAP.
2. Use the existing stderr instead of merging `stderr` and `stdout` via `redirectErrorStream`
3. Use `tryWithResource`.

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

No.

### How was this patch tested?

Manual review.

Closes apache#41731 from dongjoon-hyun/SPARK-44153-2.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 646388e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants