alismess-db opened a new pull request #28544:
URL: https://github.com/apache/spark/pull/28544


   ### What changes were proposed in this pull request?
   
   This is a recreation of #28155, which was reverted due to causing test 
failures.
   
   The update methods in HiveThriftServer2Listener now check if the parameter 
operation/session ID actually exist in the `sessionList` and `executionList` 
respectively. This prevents NullPointerExceptions if the operation or session 
ID is unknown. Instead, a warning is written to the log.
   
   Also, in HiveSessionImpl.close(), we catch any exception thrown by 
`operationManager.closeOperation`. If for any reason this throws an exception, 
other operations are not prevented from being closed.
   
   ### Why are the changes needed?
   
   The listener's update methods would throw an exception if the operation or 
session ID is unknown. In Spark 2, where the listener is called directly, this 
hampers with the caller's control flow. In Spark 3, the exception is caught by 
the ListenerBus but results in an uninformative NullPointerException.
   
   In HiveSessionImpl.close(), if an exception is thrown when closing an 
operation, all following operations are not closed.
   
   ### Does this PR introduce any user-facing change?
   
   No
   
   ### How was this patch tested?
   
   Unit tests
   
   


----------------------------------------------------------------
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.

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