Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Jun 8, 2020

What changes were proposed in this pull request?

This PR proposes to use existing util org.apache.spark.util.Utils.exceptionString for the same codes at:

    jwriter = jvm.java.io.StringWriter()
    e.printStackTrace(jvm.java.io.PrintWriter(jwriter))
    stacktrace = jwriter.toString()

Why are the changes needed?

To deduplicate codes. Plus, less communication between JVM and Py4j.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manually tested.

@HyukjinKwon
Copy link
Member Author

@ueshin, can you take a quick look when you're available?

Copy link
Member

@ueshin ueshin left a comment

Choose a reason for hiding this comment

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

LGTM.

@HyukjinKwon
Copy link
Member Author

There's no test. I just manually tested. I am going to merge this.

@HyukjinKwon
Copy link
Member Author

Merged to master and branch-3.0.

Thanks, @ueshin.

HyukjinKwon added a commit that referenced this pull request Jun 8, 2020
…eptionString in Python exception handling

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

This PR proposes to use existing util `org.apache.spark.util.Utils.exceptionString` for the same codes at:

```python
    jwriter = jvm.java.io.StringWriter()
    e.printStackTrace(jvm.java.io.PrintWriter(jwriter))
    stacktrace = jwriter.toString()
```

### Why are the changes needed?

To deduplicate codes. Plus, less communication between JVM and Py4j.

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

No.

### How was this patch tested?

Manually tested.

Closes #28749 from HyukjinKwon/SPARK-31849-followup.

Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
@SparkQA
Copy link

SparkQA commented Jun 8, 2020

Test build #123615 has finished for PR 28749 at commit 87113bc.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon HyukjinKwon deleted the SPARK-31849-followup branch July 27, 2020 07:44
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