[sql]use SparkSQLEnv.stop() in ShutdownHook

Author: wangfei <wangfei1@huawei.com>

Closes #1852 from scwf/patch-3 and squashes the following commits:

ae28c29 [wangfei] use SparkSQLEnv.stop() in ShutdownHook
This commit is contained in:
wangfei 2014-08-11 20:10:13 -07:00 committed by Michael Armbrust
parent 21a95ef051
commit e83fdcd421

View file

@ -60,7 +60,7 @@ private[hive] object HiveThriftServer2 extends Logging {
Runtime.getRuntime.addShutdownHook( Runtime.getRuntime.addShutdownHook(
new Thread() { new Thread() {
override def run() { override def run() {
SparkSQLEnv.sparkContext.stop() SparkSQLEnv.stop()
} }
} }
) )