File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ import jline.{ConsoleReader, History}
2626import org .apache .commons .lang .StringUtils
2727import org .apache .commons .logging .LogFactory
2828import org .apache .hadoop .conf .Configuration
29- import org .apache .hadoop .fs .FileSystem
30- import org .apache .hadoop .util .ShutdownHookManager
3129import org .apache .hadoop .hive .cli .{CliDriver , CliSessionState , OptionsProcessor }
3230import org .apache .hadoop .hive .common .LogUtils .LogInitializationException
3331import org .apache .hadoop .hive .common .{HiveInterruptCallback , HiveInterruptUtils , LogUtils }
@@ -118,17 +116,13 @@ private[hive] object SparkSQLCLIDriver {
118116 SessionState .start(sessionState)
119117
120118 // Clean up after we exit
121- /**
122- * This should be executed before shutdown hook of
123- * FileSystem to avoid race condition of FileSystem operation
124- */
125- ShutdownHookManager .get.addShutdownHook(
119+ Runtime .getRuntime.addShutdownHook(
126120 new Thread () {
127121 override def run () {
128122 SparkSQLEnv .stop()
129123 }
130124 }
131- , FileSystem . SHUTDOWN_HOOK_PRIORITY - 1 )
125+ )
132126
133127 // "-h" option has been passed, so connect to Hive thrift server.
134128 if (sessionState.getHost != null ) {
You can’t perform that action at this time.
0 commit comments