grundprinzip opened a new pull request, #39212:
URL: https://github.com/apache/spark/pull/39212

   ### What changes were proposed in this pull request?
   This PR improves the error handling on the Spark Connect server and client 
side. First, this patch moves the error handling logic on the server into a 
common error handler partial function that differentiates between the internal 
Spark errors and other runtime errors.
   
   For custom Spark exceptions, the actual internal error is wrapped into a 
Google RPC Status and sent as trailing metadata to the client.
   
   On the client side, similarly, the error handling is moved into a common 
function. All GRPC errors are wrapped into custom exceptions to avoid 
presenting the user with confusing GRPC errors. If available the attached RPC 
status is extracted and added to the exception. 
   
   Lastly, this patch adds basic logging functionality that can be enabled 
using the environment variable `SPARK_CONNECT_LOG_LEVEL` and can be set to 
`info`, `warn`, `error`, and `debug`.
   
   
   
   ### Why are the changes needed?
   Usability
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   UT


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to