You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/04/18 06:37:52 UTC
[GitHub] [spark] HyukjinKwon commented on a diff in pull request #40575: [SPARK-42945][CONNECT] Support PYSPARK_JVM_STACKTRACE_ENABLED in Spark Connect
HyukjinKwon commented on code in PR #40575:
URL: https://github.com/apache/spark/pull/40575#discussion_r1169559482
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala:
##########
@@ -73,19 +74,29 @@ class SparkConnectService(debug: Boolean)
classes.toSeq
}
- private def buildStatusFromThrowable(st: Throwable): RPCStatus = {
+ private def buildStatusFromThrowable(
+ st: Throwable,
+ stackTraceEnabled: Boolean = false): RPCStatus = {
val message = StringUtils.abbreviate(st.getMessage, 2048)
+ val errorInfo = ErrorInfo
+ .newBuilder()
+ .setReason(st.getClass.getName)
+ .setDomain("org.apache.spark")
+ .putMetadata("classes", compact(render(allClasses(st.getClass).map(_.getName))))
+
+ val withStackTrace = if (stackTraceEnabled) {
+ import org.apache.spark.sql.connect.config.Connect.CONNECT_JVM_STACK_TRACE_SIZE
Review Comment:
You can just import this on the top.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org