Skip to content

Commit 0e7b45d

Browse files
committed
Revert "[SPARK-2970] [SQL] spark-sql script ends with IOException when EventLogging is enabled"
This reverts commit 905dc4b.
1 parent e1262ec commit 0e7b45d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import jline.{ConsoleReader, History}
2626
import org.apache.commons.lang.StringUtils
2727
import org.apache.commons.logging.LogFactory
2828
import org.apache.hadoop.conf.Configuration
29-
import org.apache.hadoop.fs.FileSystem
30-
import org.apache.hadoop.util.ShutdownHookManager
3129
import org.apache.hadoop.hive.cli.{CliDriver, CliSessionState, OptionsProcessor}
3230
import org.apache.hadoop.hive.common.LogUtils.LogInitializationException
3331
import 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) {

0 commit comments

Comments
 (0)