Github user steveloughran commented on the pull request:

    https://github.com/apache/spark/pull/9232#issuecomment-150688417
  
    Updated patch
    1. Moves all arg validation up before any hive class reflection
    1. gets all hive class methods before attempting to call any
    1. calls `Hive.closeCurrent()` in a finally block (if it could be loaded); 
catches and logs exceptions @ warn
    
    With this load-methods-first strategy, the `closeCurrent` variable will 
always contain a value prior to `Hive.get()` being invoked. As a result, 
`Hive.closeCurrent()` will always be invoked after `Hive.get()` method has been 
invoked (irrespective of outcome), so is guaranteed to trigger a cleanup once a 
Hive instance was created. Previously, any failure of 
`Hive.getDelegationToken()` would skip the cleanup. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to