Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4771#discussion_r25419499
  
    --- Diff: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
 ---
    @@ -101,13 +104,16 @@ private[hive] object SparkSQLCLIDriver {
         SessionState.start(sessionState)
     
         // Clean up after we exit
    -    Runtime.getRuntime.addShutdownHook(
    -      new Thread() {
    -        override def run() {
    -          SparkSQLEnv.stop()
    -        }
    +    val cleanupHook = new Runnable {
    --- End diff --
    
    Does this need to be saved as a member? I think is can just be passed as an 
arg directly below.
    Also `SparkSQLCLIDriver.SHUTDOWN_HOOK_PRIORITY` doesn't need to be 
qualified with class name.
    
    @vanzin @piaozhexiu this is looking good and I wonder, are there other 
places that need a similar treatment? might as well zap all instances of this 
type of race.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to